\doxysubsection{ipv4-\/dgr-\/routing.cc}
\hypertarget{ipv4-dgr-routing_8cc_source}{}\label{ipv4-dgr-routing_8cc_source}\index{model/ipv4-\/dgr-\/routing.cc@{model/ipv4-\/dgr-\/routing.cc}}
\mbox{\hyperlink{ipv4-dgr-routing_8cc}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00001}00001\ \textcolor{comment}{//\ -\/*-\/\ Mode:C++;\ c-\/file-\/style:"{}gnu"{};\ indent-\/tabs-\/mode:nil;\ -\/*-\/}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00002}00002\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00003}00003\ \textcolor{comment}{//\ Copyright\ (c)\ 2008\ University\ of\ Washington}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00004}00004\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00005}00005\ \textcolor{comment}{//\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ modify}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00006}00006\ \textcolor{comment}{//\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ version\ 2\ as}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00007}00007\ \textcolor{comment}{//\ published\ by\ the\ Free\ Software\ Foundation;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00008}00008\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00009}00009\ \textcolor{comment}{//\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00010}00010\ \textcolor{comment}{//\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00011}00011\ \textcolor{comment}{//\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00012}00012\ \textcolor{comment}{//\ GNU\ General\ Public\ License\ for\ more\ details.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00013}00013\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00014}00014\ \textcolor{comment}{//\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00015}00015\ \textcolor{comment}{//\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00016}00016\ \textcolor{comment}{//\ Foundation,\ Inc.,\ 59\ Temple\ Place,\ Suite\ 330,\ Boston,\ MA\ \ 02111-\/1307\ \ USA}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00017}00017\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00018}00018\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00019}00019\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00020}00020\ \textcolor{preprocessor}{\#include\ <iomanip>}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00021}00021\ \textcolor{preprocessor}{\#include\ <string>}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}ns3/names.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00023}00023\ \textcolor{preprocessor}{\#include\ "{}ns3/log.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00024}00024\ \textcolor{preprocessor}{\#include\ "{}ns3/simulator.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00025}00025\ \textcolor{preprocessor}{\#include\ "{}ns3/object.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00026}00026\ \textcolor{preprocessor}{\#include\ "{}ns3/packet.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00027}00027\ \textcolor{preprocessor}{\#include\ "{}ns3/network-\/module.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00028}00028\ \textcolor{preprocessor}{\#include\ "{}ns3/traffic-\/control-\/module.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00029}00029\ \textcolor{preprocessor}{\#include\ "{}ns3/loopback-\/net-\/device.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00030}00030\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4-\/route.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00031}00031\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4-\/routing-\/table-\/entry.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00032}00032\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4-\/packet-\/info-\/tag.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00033}00033\ \textcolor{preprocessor}{\#include\ "{}ns3/boolean.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00034}00034\ \textcolor{preprocessor}{\#include\ "{}ns3/node.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00035}00035\ \textcolor{preprocessor}{\#include\ "{}ns3/socket-\/factory.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00036}00036\ \textcolor{preprocessor}{\#include\ "{}ns3/udp-\/socket-\/factory.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00037}00037\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{ipv4-dgr-routing_8h}{ipv4-\/dgr-\/routing.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00038}00038\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgr-header_8h}{dgr-\/header.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00039}00039\ \textcolor{preprocessor}{\#include\ "{}ns3/udp-\/header.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00040}00040\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgr-route-manager_8h}{dgr-\/route-\/manager.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00041}00041\ \textcolor{preprocessor}{\#include\ "{}ns3/point-\/to-\/point-\/module.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00042}00042\ \textcolor{preprocessor}{\#include\ "{}ns3/ipv4-\/list-\/routing.h"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00043}00043\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgrv2-queue-disc_8h}{dgrv2-\/queue-\/disc.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00044}00044\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{dgr-tags_8h}{dgr-\/tags.h}}"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00045}00045\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00046}\mbox{\hyperlink{ipv4-dgr-routing_8cc_a52dae417495c2e56cb353b2adfe23deb}{00046}}\ \textcolor{preprocessor}{\#define\ DGR\_PORT\ 666}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00047}\mbox{\hyperlink{ipv4-dgr-routing_8cc_ad1091203cec743531394bb68c50304ba}{00047}}\ \textcolor{preprocessor}{\#define\ DGR\_BROAD\_CAST\ "{}224.0.0.13"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00048}00048\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00049}00049\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespacens3}{ns3}}\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00050}00050\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00051}\mbox{\hyperlink{namespacens3_ab517f9a1140c711080221b9fd32a5a45}{00051}}\ \mbox{\hyperlink{namespacens3_adde9ed23eff577cdfec10d85035e32eb}{NS\_LOG\_COMPONENT\_DEFINE}}\ (\textcolor{stringliteral}{"{}Ipv4DGRRouting"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00052}00052\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00053}\mbox{\hyperlink{namespacens3_a28a17f5f3944ceed101b101f68c5362f}{00053}}\ \mbox{\hyperlink{namespacens3_aef8bf32b4f2f98d854532bfb36d47a7c}{NS\_OBJECT\_ENSURE\_REGISTERED}}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing}{Ipv4DGRRouting}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00054}00054\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00055}00055\ TypeId\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00056}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a036fb895e8c59952080959790ce8c665}{00056}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a036fb895e8c59952080959790ce8c665}{Ipv4DGRRouting::GetTypeId}}\ (\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00057}00057\ \{\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00058}00058\ \ \ \textcolor{keyword}{static}\ TypeId\ tid\ =\ TypeId\ (\textcolor{stringliteral}{"{}ns3::Ipv4DGRRouting"{}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00059}00059\ \ \ \ \ .SetParent<\mbox{\hyperlink{class_ipv4_routing_protocol}{Ipv4RoutingProtocol}}>\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00060}00060\ \ \ \ \ .SetGroupName\ (\textcolor{stringliteral}{"{}DGR-\/routing"{}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00061}00061\ \ \ \ \ .AddConstructor<\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing}{Ipv4DGRRouting}}>\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00062}00062\ \ \ \ \ .AddAttribute\ (\textcolor{stringliteral}{"{}RandomEcmpRouting"{}},}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00063}00063\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Set\ to\ true\ if\ packets\ are\ randomly\ routed\ among\ ECMP;\ set\ to\ false\ for\ using\ only\ one\ route\ consistently"{}},}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00064}00064\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ BooleanValue\ (\textcolor{keyword}{false}),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00065}00065\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MakeBooleanAccessor\ (\&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3df34b3a6127f1b45c0c5406e8080226}{Ipv4DGRRouting::m\_randomEcmpRouting}}),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00066}00066\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MakeBooleanChecker\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00067}00067\ \ \ \ \ .AddAttribute\ (\textcolor{stringliteral}{"{}RespondToInterfaceEvents"{}},}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00068}00068\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Set\ to\ true\ if\ you\ want\ to\ dynamically\ recompute\ the\ global\ routes\ upon\ Interface\ notification\ events\ (up/down,\ or\ add/remove\ address)"{}},}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00069}00069\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ BooleanValue\ (\textcolor{keyword}{false}),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00070}00070\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MakeBooleanAccessor\ (\&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a89c21e449a0c76b491a29fb1e1e81eb9}{Ipv4DGRRouting::m\_respondToInterfaceEvents}}),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00071}00071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MakeBooleanChecker\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00072}00072\ \ \ \ \ .AddAttribute\ (\textcolor{stringliteral}{"{}SamplePeriod"{}},}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00073}00073\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Time\ between\ two\ Unsolicited\ Neighbor\ State\ Updates."{}},}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00074}00074\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TimeValue(MilliSeconds\ (10)),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00075}00075\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MakeTimeAccessor\ (\&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa6cef6ca1b8081689f2c63246b96eacb}{Ipv4DGRRouting::m\_unsolicitedUpdate}}),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00076}00076\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ MakeTimeChecker\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00077}00077\ \ \ ;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00078}00078\ \ \ \textcolor{keywordflow}{return}\ tid;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00079}00079\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00080}00080\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00081}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aec9dd007650cdc339cc98cfd210ebe22}{00081}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aec9dd007650cdc339cc98cfd210ebe22}{Ipv4DGRRouting::Ipv4DGRRouting}}\ ()\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00082}00082\ \ \ :\ m\_randomEcmpRouting\ (false),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00083}00083\ \ \ \ \ m\_respondToInterfaceEvents\ (false),}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00084}00084\ \ \ \ \ m\_nsdb\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00085}00085\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00086}00086\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00087}00087\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a92e2368664df1213c26bafd520582032}{m\_rand}}\ =\ CreateObject<UniformRandomVariable>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00088}00088\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00089}00089\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00090}00090\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00091}00091\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00092}00092\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00093}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a721c9a4f9f12805a8c68f2972bbe2e9c}{00093}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a721c9a4f9f12805a8c68f2972bbe2e9c}{Ipv4DGRRouting::\string~Ipv4DGRRouting}}\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00094}00094\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00095}00095\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00096}00096\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00097}00097\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00098}00098\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00099}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff852295cbcf0faf17da98100b6d04ab}{00099}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff852295cbcf0faf17da98100b6d04ab}{Ipv4DGRRouting::AddHostRouteTo}}\ (Ipv4Address\ dest,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00100}00100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00101}00101\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ interface)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00102}00102\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00103}00103\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ dest\ <<\ nextHop\ <<\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00104}00104\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *route\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00105}00105\ \ \ *route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a757bd4b15ca66094c58f9c8045b24015}{Ipv4DGRRoutingTableEntry::CreateHostRouteTo}}\ (dest,\ nextHop,\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00106}00106\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.push\_back\ (route);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00107}00107\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00108}00108\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00109}00109\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00110}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_ae1c0d5ec9bcd3ef52d811baac3c178e0}{00110}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff852295cbcf0faf17da98100b6d04ab}{Ipv4DGRRouting::AddHostRouteTo}}\ (Ipv4Address\ dest,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00111}00111\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ interface)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00112}00112\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00113}00113\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ dest\ <<\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00114}00114\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *route\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00115}00115\ \ \ *route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a757bd4b15ca66094c58f9c8045b24015}{Ipv4DGRRoutingTableEntry::CreateHostRouteTo}}\ (dest,\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00116}00116\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.push\_back\ (route);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00117}00117\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00118}00118\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00129}00129\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00130}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aad885ac0c786c4534adf30cfe4e252dd}{00130}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff852295cbcf0faf17da98100b6d04ab}{Ipv4DGRRouting::AddHostRouteTo}}\ (Ipv4Address\ dest,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00131}00131\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00132}00132\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ interface,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00133}00133\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ nextInterface,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00134}00134\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ distance)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00135}00135\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00136}00136\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ dest\ <<\ nextHop\ <<\ interface\ <<\ nextInterface\ <<\ distance);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00137}00137\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *route\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00138}00138\ \ \ *route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a757bd4b15ca66094c58f9c8045b24015}{Ipv4DGRRoutingTableEntry::CreateHostRouteTo}}(dest,\ nextHop,\ interface,\ nextInterface,\ distance);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00139}00139\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.push\_back\ (route);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00140}00140\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00141}00141\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00142}00142\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00143}00143\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00144}00144\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00145}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aaf886686054aa6dfa4779ce25b4ee21a}{00145}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aaf886686054aa6dfa4779ce25b4ee21a}{Ipv4DGRRouting::AddNetworkRouteTo}}\ (Ipv4Address\ network,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00146}00146\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Mask\ networkMask,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00147}00147\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00148}00148\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ interface)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00149}00149\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00150}00150\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ network\ <<\ networkMask\ <<\ nextHop\ <<\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00151}00151\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *route\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00152}00152\ \ \ *route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ac251919954195223794f62f921d9708b}{Ipv4DGRRoutingTableEntry::CreateNetworkRouteTo}}\ (network,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00153}00153\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ networkMask,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00154}00154\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ nextHop,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00155}00155\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00156}00156\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.push\_back\ (route);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00157}00157\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00158}00158\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00159}00159\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00160}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_abf9ab62c2bdc32fa7358ad9418442314}{00160}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aaf886686054aa6dfa4779ce25b4ee21a}{Ipv4DGRRouting::AddNetworkRouteTo}}\ (Ipv4Address\ network,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00161}00161\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Mask\ networkMask,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00162}00162\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ interface)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00163}00163\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00164}00164\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ network\ <<\ networkMask\ <<\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00165}00165\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *route\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00166}00166\ \ \ *route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ac251919954195223794f62f921d9708b}{Ipv4DGRRoutingTableEntry::CreateNetworkRouteTo}}\ (network,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00167}00167\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ networkMask,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00168}00168\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00169}00169\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.push\_back\ (route);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00170}00170\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00171}00171\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00172}00172\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00173}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a94b9f168bd3285ed47b5c5f1f59f847b}{00173}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a94b9f168bd3285ed47b5c5f1f59f847b}{Ipv4DGRRouting::AddASExternalRouteTo}}\ (Ipv4Address\ network,\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00174}00174\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Mask\ networkMask,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00175}00175\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ nextHop,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00176}00176\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ interface)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00177}00177\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00178}00178\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ network\ <<\ networkMask\ <<\ nextHop\ <<\ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00179}00179\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *route\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00180}00180\ \ \ *route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ac251919954195223794f62f921d9708b}{Ipv4DGRRoutingTableEntry::CreateNetworkRouteTo}}\ (network,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00181}00181\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ networkMask,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00182}00182\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ nextHop,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00183}00183\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00184}00184\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.push\_back\ (route);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00185}00185\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00186}00186\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00187}00187\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00188}00188\ Ptr<Ipv4Route>}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00189}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a95ddcbfcdb50ecdb48bfd91575836fe6}{00189}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a95ddcbfcdb50ecdb48bfd91575836fe6}{Ipv4DGRRouting::LookupUniRoute}}\ (Ipv4Address\ dest,\ Ptr<NetDevice>\ oif)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00190}00190\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00194}00194\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ dest\ <<\ oif);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00195}00195\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Looking\ for\ route\ for\ destination\ "{}}\ <<\ dest);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00196}00196\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00197}00197\ \ \ Ptr<Ipv4Route>\ rtentry\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00198}00198\ \ \ \textcolor{comment}{//\ store\ all\ available\ routes\ that\ bring\ packets\ to\ their\ destination}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00199}00199\ \ \ \textcolor{keyword}{typedef}\ std::vector<Ipv4DGRRoutingTableEntry*>\ RouteVec\_t;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00200}00200\ \ \ RouteVec\_t\ allRoutes;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00201}00201\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00202}00202\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Number\ of\ m\_hostRoutes\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00203}00203\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a619144f0acc141bc74ae09ace488009a}{HostRoutesCI}}\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00204}00204\ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00205}00205\ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00206}00206\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00207}00207\ \ \ \ \ \ \ NS\_ASSERT\ ((*i)-\/>IsHost\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00208}00208\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((*i)-\/>GetDest\ ()\ ==\ dest)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00209}00209\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00210}00210\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (oif)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00211}00211\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00212}00212\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (oif\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ()))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00213}00213\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00214}00214\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Not\ on\ requested\ interface,\ skipping"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00215}00215\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00216}00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00217}00217\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00218}00218\ \ \ \ \ \ \ \ \ \ \ allRoutes.push\_back\ (*\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00219}00219\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (allRoutes.size\ ()\ <<\ \textcolor{stringliteral}{"{}Found\ DGR\ host\ route"{}}\ <<\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00220}00220\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00221}00221\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00222}00222\ \ \ \textcolor{keywordflow}{if}\ (allRoutes.size\ ()\ >\ 0\ )\ \textcolor{comment}{//\ if\ route(s)\ is\ found}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00223}00223\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00224}00224\ \ \ \ \ \ \ uint32\_t\ routRef\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00225}00225\ \ \ \ \ \ \ uint32\_t\ shortestDist\ =\ allRoutes.at(0)-\/>GetDistance\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00226}00226\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ allRoutes.size\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ ++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00227}00227\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00228}00228\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (allRoutes.at\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>GetDistance\ ()\ <\ \ shortestDist)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00229}00229\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00230}00230\ \ \ \ \ \ \ \ \ \ \ routRef\ =\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00231}00231\ \ \ \ \ \ \ \ \ \ \ shortestDist\ =\ allRoutes.at\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})-\/>GetDistance\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00232}00232\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00233}00233\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00234}00234\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}*\ route\ =\ allRoutes.at\ (routRef);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00235}00235\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00236}00236\ \ \ \ \ \ \ \textcolor{comment}{//\ create\ a\ Ipv4Route\ object\ from\ the\ selected\ routing\ table\ entry}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00237}00237\ \ \ \ \ \ \ rtentry\ =\ Create<Ipv4Route>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00238}00238\ \ \ \ \ \ \ rtentry-\/>SetDestination\ (route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a69ebd01d00df5465ad4d720baf20aac5}{GetDest}}\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00240}00240\ \ \ \ \ \ \ rtentry-\/>SetSource\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetAddress\ (route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a2b9549ad4a8d225b40c3f7dcd2c29c25}{GetInterface}}\ (),\ 0).GetLocal\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00241}00241\ \ \ \ \ \ \ rtentry-\/>SetGateway\ (route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a19708a359b875e0b8986ff99f80c159c}{GetGateway}}\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00242}00242\ \ \ \ \ \ \ uint32\_t\ interfaceIdx\ =\ route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a2b9549ad4a8d225b40c3f7dcd2c29c25}{GetInterface}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00243}00243\ \ \ \ \ \ \ rtentry-\/>SetOutputDevice\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (interfaceIdx));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00244}00244\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ rtentry;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00245}00245\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00246}00246\ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00247}00247\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00248}00248\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00249}00249\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00250}00250\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00251}00251\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00252}00252\ Ptr<Ipv4Route>}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00253}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a552819000c07190404d6bd5db6d1ce84}{00253}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a552819000c07190404d6bd5db6d1ce84}{Ipv4DGRRouting::LookupDGRRoute}}\ (Ipv4Address\ dest,\ Ptr<Packet>\ p,\ Ptr<const\ NetDevice>\ idev)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00254}00254\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00255}00255\ \ \ \mbox{\hyperlink{classns3_1_1_budget_tag}{BudgetTag}}\ bgtTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00256}00256\ \ \ TimestampTag\ timeTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00257}00257\ \ \ p-\/>PeekPacketTag\ (bgtTag);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00258}00258\ \ \ p-\/>PeekPacketTag\ (timeTag);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00259}00259\ \ \ \textcolor{comment}{//\ avoid\ loop}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00260}00260\ \ \ \mbox{\hyperlink{classns3_1_1_dist_tag}{DistTag}}\ distTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00261}00261\ \ \ uint32\_t\ dist\ =\ UINT32\_MAX;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00262}00262\ \ \ dist\ -\/=\ 1;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00263}00263\ \ \ \textcolor{keywordflow}{if}\ (p-\/>PeekPacketTag\ (distTag))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00264}00264\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00265}00265\ \ \ \ \ \ \ dist\ =\ distTag.\mbox{\hyperlink{classns3_1_1_dist_tag_abdba4f115af1156fa9971edb1f9dfa13}{GetDistance}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00266}00266\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00267}00267\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00268}00268\ \ \ \textcolor{comment}{//\ budget\ in\ microseconds}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00269}00269\ \ \ uint32\_t\ bgt;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00270}00270\ \ \ \textcolor{keywordflow}{if}\ (bgtTag.\mbox{\hyperlink{classns3_1_1_budget_tag_ac6b06a85217e94b7b12bb66a000d500b}{GetBudget}}\ ()*1000\ +\ timeTag.GetTimestamp\ ().GetMicroSeconds\ ()\ <\ Simulator::Now\ ().GetMicroSeconds\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00271}00271\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00272}00272\ \ \ \ \ \ \ bgt\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00273}00273\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00274}00274\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00275}00275\ \ \ \ \ bgt\ =\ (bgtTag.\mbox{\hyperlink{classns3_1_1_budget_tag_ac6b06a85217e94b7b12bb66a000d500b}{GetBudget}}\ ()*1000\ +\ timeTag.GetTimestamp\ ().GetMicroSeconds\ ()\ -\/\ Simulator::Now\ ().GetMicroSeconds\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00276}00276\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00277}00277\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ dest\ <<\ idev);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00278}00278\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Looking\ for\ route\ for\ destination\ "{}}\ <<\ dest);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00279}00279\ \ \ Ptr<Ipv4Route>\ rtentry\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00280}00280\ \ \ \textcolor{comment}{//\ store\ all\ available\ routes\ that\ bring\ packets\ to\ their\ destination}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00281}00281\ \ \ \textcolor{keyword}{typedef}\ std::vector<Ipv4DGRRoutingTableEntry*>\ RouteVec\_t;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00282}00282\ \ \ \textcolor{comment}{//\ typedef\ std::vector<Ipv4DGRRoutingTableEntry\ *>::const\_iterator\ RouteVecCI\_t;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00283}00283\ \ \ RouteVec\_t\ allRoutes;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00284}00284\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00285}00285\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Number\ of\ m\_hostRoutes\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00286}00286\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a619144f0acc141bc74ae09ace488009a}{HostRoutesCI}}\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00287}00287\ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00288}00288\ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00289}00289\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00290}00290\ \ \ \ \ \ \ NS\_ASSERT\ ((*i)-\/>IsHost\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00291}00291\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((*i)-\/>GetDest\ ()\ ==\ dest)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00292}00292\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00293}00293\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (idev)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00294}00294\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00295}00295\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (idev\ ==\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ()))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00296}00296\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00297}00297\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Not\ on\ requested\ interface,\ skipping"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00298}00298\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00299}00299\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00300}00300\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00301}00301\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00302}00302\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ if\ interface\ is\ down,\ continue}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00303}00303\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>IsUp\ ((*i)-\/>GetInterface\ ()))\ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00304}00304\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00305}00305\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ get\ the\ output\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00306}00306\ \ \ \ \ \ \ \ \ \ \ Ptr\ <NetDevice>\ dev\_local\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00307}00307\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//get\ the\ queue\ disc\ on\ the\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00308}00308\ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ disc\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ()-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (dev\_local);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00309}00309\ \ \ \ \ \ \ \ \ \ \ Ptr<DGRv2QueueDisc>\ dvq\ =\ DynamicCast\ <DGRv2QueueDisc>\ (disc);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00310}00310\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ status\_local\ =\ dvq-\/>GetQueueStatus\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00311}00311\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00312}00312\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Get\ the\ next\ hop\ queue\ status\ of\ this\ route}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00313}00313\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ status\_1\_hop\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00314}00314\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((*i)-\/>GetNextInterface\ ()\ !=\ 0xffffffff)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00315}00315\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00316}00316\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ iface\ =\ (*i)-\/>GetInterface\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00317}00317\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ niface\ =\ (*i)-\/>GetNextInterface\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00318}00318\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_neighbor_status_entry}{NeighborStatusEntry}}\ *entry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a20d3a603d150f5ce97b49bcd1028e7e0}{m\_nsdb}}.\mbox{\hyperlink{classns3_1_1_dgr_n_s_d_b_a0d9ea8c82a764230832d72825bce2fce}{GetNeighborStatusEntry}}\ (iface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00319}00319\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_status_unit}{StatusUnit}}\ *su\ =\ entry-\/>\mbox{\hyperlink{classns3_1_1_neighbor_status_entry_a247a7c414ca757992904f162888375d9}{GetStatusUnit}}\ (niface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00320}00320\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ status\_1\_hop\ =\ su-\/>\mbox{\hyperlink{classns3_1_1_status_unit_a165815e13c7cda840f5e77961f412b8d}{GetCurrentState}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00321}00321\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00322}00322\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ in\ millisecond}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00323}00323\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ estimate\_delay\ =\ (*i)-\/>GetDistance\ ()\ +\ (status\_local\ +\ status\_1\_hop)*2;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00324}00324\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (estimate\_delay\ >\ bgt)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00325}00325\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00326}00326\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Too\ far\ to\ the\ destination,\ skipping"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00327}00327\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00328}00328\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00329}00329\ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00330}00330\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((*i)-\/>GetDistance\ ()\ >\ dist)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00331}00331\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00332}00332\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Loop\ avoidance,\ skipping"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00333}00333\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00334}00334\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00335}00335\ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00336}00336\ \ \ \ \ \ \ \ \ \ \ allRoutes.push\_back\ (*\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00337}00337\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (allRoutes.size\ ()\ <<\ \textcolor{stringliteral}{"{}Found\ DGR\ host\ route"{}}\ <<\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{}\ with\ Cost:\ "{}}\ <<\ (*i)-\/>GetDistance\ ());\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00338}00338\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00339}00339\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00340}00340\ \ \ \textcolor{keywordflow}{if}\ (allRoutes.size\ ()\ >\ 0\ )\ \textcolor{comment}{//\ if\ route(s)\ is\ found}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00341}00341\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00342}00342\ \ \ \ \ \ \ \textcolor{comment}{//\ random\ select}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00343}00343\ \ \ \ \ \ \ uint32\_t\ selectIndex\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a92e2368664df1213c26bafd520582032}{m\_rand}}-\/>GetInteger\ (0,\ allRoutes.size\ ()-\/1);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00344}00344\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00345}00345\ \ \ \ \ \ \ \textcolor{comment}{//\ //\ optimal}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00346}00346\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00347}00347\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ min\ =\ UINT32\_MAX;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00348}00348\ \ \ \ \ \ \ \textcolor{comment}{//\ for\ (uint32\_t\ i\ =\ 0;\ i\ <\ allRoutes.size\ ();\ i++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00349}00349\ \ \ \ \ \ \ \textcolor{comment}{//\ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00350}00350\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ if\ (allRoutes.at\ (i)-\/>GetDistance\ ()\ <\ min)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00351}00351\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00352}00352\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ min\ =\ allRoutes.at\ (i)-\/>GetDistance\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00353}00353\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ selectIndex\ =\ i;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00354}00354\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00355}00355\ \ \ \ \ \ \ \textcolor{comment}{//\ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00356}00356\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00357}00357\ \ \ \ \ \ \ \textcolor{comment}{//\ //\ worst}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00358}00358\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00359}00359\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ max\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00360}00360\ \ \ \ \ \ \ \textcolor{comment}{//\ for\ (uint32\_t\ i\ =\ 0;\ i\ <\ allRoutes.size\ ();\ i++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00361}00361\ \ \ \ \ \ \ \textcolor{comment}{//\ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00362}00362\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ if\ (allRoutes.at\ (i)-\/>GetDistance\ ()\ >\ max)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00363}00363\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00364}00364\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ max\ =\ allRoutes.at\ (i)-\/>GetDistance\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00365}00365\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ selectIndex\ =\ i;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00366}00366\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00367}00367\ \ \ \ \ \ \ \textcolor{comment}{//\ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00368}00368\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00369}00369\ \ \ \ \ \ \ \textcolor{comment}{//\ //\ back\ pressure\ selection}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00370}00370\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00371}00371\ \ \ \ \ \ \ \textcolor{comment}{//\ double\ minPressure\ =\ 1.0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00372}00372\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ k\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00373}00373\ \ \ \ \ \ \ \textcolor{comment}{//\ for\ (RouteVecCI\_t\ i\ =\ allRoutes.begin\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00374}00374\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ i\ !=\ allRoutes.end\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00375}00375\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ i++,\ k\ ++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00376}00376\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00377}00377\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ //\ get\ the\ output\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00378}00378\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ Ptr\ <NetDevice>\ dev\ =\ m\_ipv4-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ());\ \ \ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00379}00379\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ //\ get\ the\ nexthop\ queue\ infomation}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00380}00380\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ Ptr<Channel>\ channel\ =\ dev-\/>GetChannel\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00381}00381\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ PointToPointChannel\ *p2pchannel\ =\ dynamic\_cast\ <PointToPointChannel\ *>\ (PeekPointer\ (channel));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00382}00382\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ if\ (p2pchannel\ !=\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00383}00383\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00384}00384\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ Ptr<Node>\ node\ =\ dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00385}00385\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ Ptr<PointToPointNetDevice>\ d\_dev\ =\ p2pchannel-\/>GetDestination\ (0)\ ==\ dev\ ?\ p2pchannel-\/>GetDestination\ (1)\ :\ p2pchannel-\/>GetDestination\ (0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00386}00386\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ Ptr<Node>\ d\_node\ =\ d\_dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00387}00387\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ if\ ((*i)-\/>GetNextInterface\ ()\ !=\ 0xffffffff)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00388}00388\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00389}00389\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ next\_dev\ =\ d\_node-\/>GetDevice\ ((*i)-\/>GetNextInterface\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00390}00390\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}next\ node:\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ "{}next\ interface:\ "{}\ <<\ (*i)-\/>GetNextInterface\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00391}00391\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ next\_disc\ =\ d\_node-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (next\_dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00392}00392\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRVirtualQueueDisc>\ next\_dvq\ =\ DynamicCast\ <DGRVirtualQueueDisc>\ (next\_disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00393}00393\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_length\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00394}00394\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_max\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00395}00395\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_slow\_length\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00396}00396\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ uint32\_t\ next\_dvq\_slow\_max\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>\ GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00397}00397\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure1\ =\ next\_dvq\_length*1.0/next\_dvq\_max;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00398}00398\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure2\ =\ next\_dvq\_slow\_length*1.0/155;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00399}00399\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (next\_dvq\_slow\_length\ !=\ 0)\ std::cout\ <<\ "{}slow\ lane\ current:\ "{}\ <<\ next\_dvq\_slow\_length\ \ <<\ "{}slow\_max:\ "{}\ <<\ next\_dvq\_slow\_max\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00400}00400\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ pressure2)\ pressure1\ =\ pressure2;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00401}00401\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (pressure1\ >\ 0.2)\ std::cout\ <<\ pressure1\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00402}00402\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ minPressure)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00403}00403\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00404}00404\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ minPressure\ =\ pressure1;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00405}00405\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ selectIndex\ =\ k;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00406}00406\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00407}00407\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00408}00408\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00409}00409\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00410}00410\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00411}00411\ \ \ \ \ \ \ \textcolor{comment}{//\ //\ back\ pressure\ +\ random\ selection}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00412}00412\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00413}00413\ \ \ \ \ \ \ \textcolor{comment}{//\ double\ minPressure\ =\ 1.0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00414}00414\ \ \ \ \ \ \ \textcolor{comment}{//\ uint32\_t\ k\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00415}00415\ \ \ \ \ \ \ \textcolor{comment}{//\ for\ (RouteVecCI\_t\ i\ =\ allRoutes.begin\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00416}00416\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ i\ !=\ allRoutes.end\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00417}00417\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ i++,\ k\ ++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00418}00418\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00419}00419\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ //\ get\ the\ output\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00420}00420\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ Ptr\ <NetDevice>\ dev\ =\ m\_ipv4-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ());\ \ \ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00421}00421\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ //\ get\ the\ nexthop\ queue\ infomation}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00422}00422\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ Ptr<Channel>\ channel\ =\ dev-\/>GetChannel\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00423}00423\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ PointToPointChannel\ *p2pchannel\ =\ dynamic\_cast\ <PointToPointChannel\ *>\ (PeekPointer\ (channel));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00424}00424\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ if\ (p2pchannel\ !=\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00425}00425\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00426}00426\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ Ptr<Node>\ node\ =\ dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00427}00427\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ Ptr<PointToPointNetDevice>\ d\_dev\ =\ p2pchannel-\/>GetDestination\ (0)\ ==\ dev\ ?\ p2pchannel-\/>GetDestination\ (1)\ :\ p2pchannel-\/>GetDestination\ (0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00428}00428\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ Ptr<Node>\ d\_node\ =\ d\_dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00429}00429\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ if\ ((*i)-\/>GetNextInterface\ ()\ !=\ 0xffffffff)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00430}00430\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00431}00431\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ next\_dev\ =\ d\_node-\/>GetDevice\ ((*i)-\/>GetNextInterface\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00432}00432\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}next\ node:\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ "{}next\ interface:\ "{}\ <<\ (*i)-\/>GetNextInterface\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00433}00433\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ next\_disc\ =\ d\_node-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (next\_dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00434}00434\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRVirtualQueueDisc>\ next\_dvq\ =\ DynamicCast\ <DGRVirtualQueueDisc>\ (next\_disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00435}00435\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_length\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00436}00436\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_max\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00437}00437\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_slow\_length\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00438}00438\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ uint32\_t\ next\_dvq\_slow\_max\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>\ GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00439}00439\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure1\ =\ next\_dvq\_length*1.0/next\_dvq\_max;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00440}00440\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure2\ =\ next\_dvq\_slow\_length*1.0/155;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00441}00441\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (next\_dvq\_slow\_length\ !=\ 0)\ std::cout\ <<\ "{}slow\ lane\ current:\ "{}\ <<\ next\_dvq\_slow\_length\ \ <<\ "{}slow\_max:\ "{}\ <<\ next\_dvq\_slow\_max\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00442}00442\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ pressure2)\ pressure1\ =\ pressure2;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00443}00443\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (pressure1\ >\ 0.2)\ std::cout\ <<\ pressure1\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00444}00444\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ minPressure)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00445}00445\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00446}00446\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ minPressure\ =\ pressure1;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00447}00447\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ selectIndex\ =\ k;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00448}00448\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00449}00449\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00450}00450\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00451}00451\ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00452}00452\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00453}00453\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}*\ route\ =\ allRoutes.at\ (selectIndex);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00454}00454\ \ \ \ \ \ \ uint32\_t\ interfaceIdx\ =\ route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a2b9549ad4a8d225b40c3f7dcd2c29c25}{GetInterface}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00455}00455\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00456}00456\ \ \ \ \ \ \ rtentry\ =\ Create<Ipv4Route>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00457}00457\ \ \ \ \ \ \ rtentry-\/>SetDestination\ (route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a69ebd01d00df5465ad4d720baf20aac5}{GetDest}}\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00459}00459\ \ \ \ \ \ \ rtentry-\/>SetSource\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetAddress\ (interfaceIdx,\ 0).GetLocal\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00460}00460\ \ \ \ \ \ \ rtentry-\/>SetGateway\ (route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a19708a359b875e0b8986ff99f80c159c}{GetGateway}}\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00461}00461\ \ \ \ \ \ \ rtentry-\/>SetOutputDevice\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (interfaceIdx));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00462}00462\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00463}00463\ \ \ \ \ \ \ distTag.\mbox{\hyperlink{classns3_1_1_dist_tag_afc8616b9abd64dd7a0ebf3d876f1dcb2}{SetDistance}}\ (route-\/>\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ad6b6cd8c1a98ab084553075f284de1b4}{GetDistance}}\ ());\ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00464}00464\ \ \ \ \ \ \ p-\/>ReplacePacketTag\ (distTag);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00465}00465\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ rtentry;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00466}00466\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00467}00467\ \ \ \textcolor{keywordflow}{else}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00468}00468\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00469}00469\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00470}00470\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00471}00471\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00472}00472\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00473}00473\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00474}00474\ \textcolor{comment}{//\ Ptr<Ipv4Route>}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00475}00475\ \textcolor{comment}{//\ Ipv4DGRRouting::LookupDGRRoute\ (Ipv4Address\ dest,\ Ptr\ <Packet>\ p,\ Ptr<const\ NetDevice>\ idev)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00476}00476\ \textcolor{comment}{//\ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00477}00477\ \textcolor{comment}{//\ \ \ PriorityTag\ prioTag;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00478}00478\ \textcolor{comment}{//\ \ \ BudgetTag\ bgtTag;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00479}00479\ \textcolor{comment}{//\ \ \ TimestampTag\ timeTag;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00480}00480\ \textcolor{comment}{//\ \ \ p-\/>PeekPacketTag\ (prioTag);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00481}00481\ \textcolor{comment}{//\ \ \ p-\/>PeekPacketTag\ (bgtTag);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00482}00482\ \textcolor{comment}{//\ \ \ p-\/>PeekPacketTag\ (timeTag);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00483}00483\ \textcolor{comment}{//\ \ \ DistTag\ distTag;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00484}00484\ \textcolor{comment}{//\ \ \ uint32\_t\ dist\ =\ UINT32\_MAX;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00485}00485\ \textcolor{comment}{//\ \ \ dist\ -\/=\ 1;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00486}00486\ \textcolor{comment}{//\ \ \ if\ (p-\/>PeekPacketTag\ (distTag))\ dist\ =\ distTag.GetDistance\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00487}00487\ \textcolor{comment}{//\ \ \ //\ budget\ in\ microseconds}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00488}00488\ \textcolor{comment}{//\ \ \ uint32\_t\ bgt;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00489}00489\ \textcolor{comment}{//\ \ \ if\ (bgtTag.GetBudget\ ()\ +\ timeTag.GetTimestamp\ ().GetMicroSeconds\ ()\ <\ Simulator::Now\ ().GetMicroSeconds\ ())}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00490}00490\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00491}00491\ \textcolor{comment}{//\ \ \ \ \ \ \ bgt\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00492}00492\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00493}00493\ \textcolor{comment}{//\ \ \ else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00494}00494\ \textcolor{comment}{//\ \ \ \ \ bgt\ =\ (bgtTag.GetBudget\ ()\ +\ timeTag.GetTimestamp\ ().GetMicroSeconds\ ()\ -\/\ Simulator::Now\ ().GetMicroSeconds\ ())/100;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00495}00495\ \textcolor{comment}{//\ \ \ /**}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00496}00496\ \textcolor{comment}{//\ \ \ \ *\ Lookup\ a\ Route\ to\ forward\ the\ DGR\ packets.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00497}00497\ \textcolor{comment}{//\ \ \ */}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00498}00498\ \textcolor{comment}{//\ \ \ NS\_LOG\_FUNCTION\ (this\ <<\ dest\ <<\ idev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00499}00499\ \textcolor{comment}{//\ \ \ NS\_LOG\_LOGIC\ ("{}Looking\ for\ route\ for\ destination\ "{}\ <<\ dest);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00500}00500\ \textcolor{comment}{//\ \ \ Ptr<Ipv4Route>\ rtentry\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00501}00501\ \textcolor{comment}{//\ \ \ //\ store\ all\ available\ routes\ that\ bring\ packets\ to\ their\ destination}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00502}00502\ \textcolor{comment}{//\ \ \ typedef\ std::vector<Ipv4DGRRoutingTableEntry*>\ RouteVec\_t;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00503}00503\ \textcolor{comment}{//\ \ \ //\ typedef\ std::vector<Ipv4DGRRoutingTableEntry\ *>::const\_iterator\ RouteVecCI\_t;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00504}00504\ \textcolor{comment}{//\ \ \ RouteVec\_t\ allRoutes;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00505}00505\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00506}00506\ \textcolor{comment}{//\ \ \ NS\_LOG\_LOGIC\ ("{}Number\ of\ m\_hostRoutes\ =\ "{}\ <<\ m\_hostRoutes.size\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00507}00507\ \textcolor{comment}{//\ \ \ for\ (HostRoutesCI\ i\ =\ m\_hostRoutes.begin\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00508}00508\ \textcolor{comment}{//\ \ \ \ \ \ \ \ i\ !=\ m\_hostRoutes.end\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00509}00509\ \textcolor{comment}{//\ \ \ \ \ \ \ \ i++)\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00510}00510\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00511}00511\ \textcolor{comment}{//\ \ \ \ \ \ \ NS\_ASSERT\ ((*i)-\/>IsHost\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00512}00512\ \textcolor{comment}{//\ \ \ \ \ \ \ if\ ((*i)-\/>GetDest\ ()\ ==\ dest)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00513}00513\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00514}00514\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (idev)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00515}00515\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00516}00516\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (idev\ ==\ m\_ipv4-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ()))}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00517}00517\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00518}00518\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Not\ on\ requested\ interface,\ skipping"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00519}00519\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00520}00520\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00521}00521\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00522}00522\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00523}00523\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ if\ interface\ is\ down,\ continue}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00524}00524\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (!m\_ipv4-\/>IsUp\ ((*i)-\/>GetInterface\ ()))\ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00525}00525\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00526}00526\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ get\ the\ output\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00527}00527\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr\ <NetDevice>\ dev\ =\ m\_ipv4-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00528}00528\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //get\ the\ queue\ disc\ on\ the\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00529}00529\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ disc\ =\ m\_ipv4-\/>GetNetDevice\ (0)-\/>GetNode\ ()-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00530}00530\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr<DGRVirtualQueueDisc>\ dvq\ =\ DynamicCast\ <DGRVirtualQueueDisc>\ (disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00531}00531\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ dvq\_length\ =\ dvq-\/>GetInternalQueue\ (1)\ -\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00532}00532\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ uint32\_t\ dvq\_max\ =\ dvq-\/>GetInternalQueue\ (1)-\/>GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00533}00533\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (dvq\_length\ >=\ dvq\_max\ *\ 0.75)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00534}00534\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00535}00535\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}congestion\ happend\ at\ node:\ "{}\ <<\ dev-\/>GetNode\ ()-\/>GetId\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00536}00536\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Congestion\ happened,\ skipping"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00537}00537\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00538}00538\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00539}00539\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ get\ the\ nexthop\ queue\ infomation}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00540}00540\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr<Channel>\ channel\ =\ dev-\/>GetChannel\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00541}00541\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ PointToPointChannel\ *p2pchannel\ =\ dynamic\_cast\ <PointToPointChannel\ *>\ (PeekPointer\ (channel));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00542}00542\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (p2pchannel\ !=\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00543}00543\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00544}00544\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Node>\ node\ =\ dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00545}00545\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<PointToPointNetDevice>\ d\_dev\ =\ p2pchannel-\/>GetDestination\ (0)\ ==\ dev\ ?\ p2pchannel-\/>GetDestination\ (1)\ :\ p2pchannel-\/>GetDestination\ (0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00546}00546\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Node>\ d\_node\ =\ d\_dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00547}00547\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}at\ node:\ "{}\ <<\ node-\/>GetId\ ()\ <<\ "{},\ "{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00548}00548\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ ((*i)-\/>GetNextInterface\ ()\ !=\ 0xffffffff)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00549}00549\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00550}00550\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ next\_dev\ =\ d\_node-\/>GetDevice\ ((*i)-\/>GetNextInterface\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00551}00551\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}next\ node:\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ "{}next\ interface:\ "{}\ <<\ (*i)-\/>GetNextInterface\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00552}00552\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ next\_disc\ =\ d\_node-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (next\_dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00553}00553\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRVirtualQueueDisc>\ next\_dvq\ =\ DynamicCast\ <DGRVirtualQueueDisc>\ (next\_disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00554}00554\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_length\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00555}00555\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_max\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00556}00556\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_slow\_length\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00557}00557\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_slow\_max\ =\ 155;\ \ //\ next\_dvq-\/>GetInternalQueue\ (2)-\/>\ GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00558}00558\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (next\_dvq\_slow\_length\ !=\ 0)\ std::cout\ <<\ "{}slow\ lane\ current:\ "{}\ <<\ next\_dvq\_slow\_length\ \ <<\ "{}slow\_max:\ "{}\ <<\ next\_dvq\_slow\_max\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00559}00559\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<"{}next\ node\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ "{}\ next\ dvq\_length:\ "{}\ <<\ next\_dvq\_length\ \ <<\ "{}\ \ \ \ "{}\ <<\ next\_dvq\_max\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00560}00560\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (next\_dvq\_length\ >=\ next\_dvq\_max\ *\ 0.75\ ||\ next\_dvq\_slow\_length\ >=\ next\_dvq\_slow\_max\ *\ 0.75)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00561}00561\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00562}00562\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}congestion\ happend\ at\ next\ node:\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00563}00563\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Congestion\ happend\ in\ next\ hop,\ skipping"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00564}00564\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00565}00565\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00566}00566\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (d\_dev\ ==\ next\_dev)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00567}00567\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{continue;\}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00568}00568\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00569}00569\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00570}00570\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00571}00571\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ find\ the\ nexthop\ queue}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00572}00572\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00573}00573\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ ((*i)-\/>GetDistance\ ()\ >\ bgt\ ||\ (*i)-\/>GetDistance\ ()\ >\ dist)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00574}00574\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00575}00575\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}at\ node:\ "{}\ <<\ dev-\/>GetNode\ ()-\/>GetId\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00576}00576\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}budget:\ "{}\ <<\ bgt\ <<\ "{}\ distance:\ "{}\ <<\ (*i)-\/>GetDistance\ ()\ <<\ "{}\ dist:\ "{}\ <<\ dist\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00577}00577\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Too\ far\ to\ the\ destination,\ skipping"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00578}00578\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00579}00579\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00580}00580\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ allRoutes.push\_back\ (*i);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00581}00581\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (allRoutes.size\ ()\ <<\ "{}Found\ DGR\ host\ route"{}\ <<\ *i\ <<\ "{}\ with\ Cost:\ "{}\ <<\ (*i)-\/>GetDistance\ ());\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00582}00582\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00583}00583\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00584}00584\ \textcolor{comment}{//\ \ \ if\ (allRoutes.size\ ()\ >\ 0\ )\ //\ if\ route(s)\ is\ found}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00585}00585\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00586}00586\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ std::cout\ <<\ "{}routes\ size:\ "{}\ <<\ allRoutes.size\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00587}00587\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ random\ select}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00588}00588\ \textcolor{comment}{//\ \ \ \ \ \ \ uint32\_t\ selectIndex\ =\ m\_rand-\/>GetInteger\ (0,\ allRoutes.size\ ()-\/1);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00589}00589\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ //\ optimal}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00590}00590\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00591}00591\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ min\ =\ UINT32\_MAX;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00592}00592\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ for\ (uint32\_t\ i\ =\ 0;\ i\ <\ allRoutes.size\ ();\ i++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00593}00593\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00594}00594\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ if\ (allRoutes.at\ (i)-\/>GetDistance\ ()\ <\ min)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00595}00595\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00596}00596\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ min\ =\ allRoutes.at\ (i)-\/>GetDistance\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00597}00597\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ selectIndex\ =\ i;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00598}00598\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00599}00599\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00600}00600\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00601}00601\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ //\ worst}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00602}00602\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00603}00603\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ max\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00604}00604\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ for\ (uint32\_t\ i\ =\ 0;\ i\ <\ allRoutes.size\ ();\ i++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00605}00605\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00606}00606\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ if\ (allRoutes.at\ (i)-\/>GetDistance\ ()\ >\ max)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00607}00607\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00608}00608\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ max\ =\ allRoutes.at\ (i)-\/>GetDistance\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00609}00609\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ selectIndex\ =\ i;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00610}00610\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00611}00611\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00612}00612\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00613}00613\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ //\ back\ pressure\ selection}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00614}00614\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00615}00615\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ double\ minPressure\ =\ 1.0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00616}00616\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ k\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00617}00617\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ for\ (RouteVecCI\_t\ i\ =\ allRoutes.begin\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00618}00618\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ i\ !=\ allRoutes.end\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00619}00619\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ i++,\ k\ ++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00620}00620\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00621}00621\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ //\ get\ the\ output\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00622}00622\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ Ptr\ <NetDevice>\ dev\ =\ m\_ipv4-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ());\ \ \ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00623}00623\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ //\ get\ the\ nexthop\ queue\ infomation}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00624}00624\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ Ptr<Channel>\ channel\ =\ dev-\/>GetChannel\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00625}00625\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ PointToPointChannel\ *p2pchannel\ =\ dynamic\_cast\ <PointToPointChannel\ *>\ (PeekPointer\ (channel));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00626}00626\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ if\ (p2pchannel\ !=\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00627}00627\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00628}00628\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ Ptr<Node>\ node\ =\ dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00629}00629\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ Ptr<PointToPointNetDevice>\ d\_dev\ =\ p2pchannel-\/>GetDestination\ (0)\ ==\ dev\ ?\ p2pchannel-\/>GetDestination\ (1)\ :\ p2pchannel-\/>GetDestination\ (0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00630}00630\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ Ptr<Node>\ d\_node\ =\ d\_dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00631}00631\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ if\ ((*i)-\/>GetNextInterface\ ()\ !=\ 0xffffffff)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00632}00632\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00633}00633\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ next\_dev\ =\ d\_node-\/>GetDevice\ ((*i)-\/>GetNextInterface\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00634}00634\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}next\ node:\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ "{}next\ interface:\ "{}\ <<\ (*i)-\/>GetNextInterface\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00635}00635\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ next\_disc\ =\ d\_node-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (next\_dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00636}00636\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRVirtualQueueDisc>\ next\_dvq\ =\ DynamicCast\ <DGRVirtualQueueDisc>\ (next\_disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00637}00637\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_length\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00638}00638\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_max\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00639}00639\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_slow\_length\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00640}00640\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ uint32\_t\ next\_dvq\_slow\_max\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>\ GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00641}00641\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure1\ =\ next\_dvq\_length*1.0/next\_dvq\_max;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00642}00642\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure2\ =\ next\_dvq\_slow\_length*1.0/155;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00643}00643\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (next\_dvq\_slow\_length\ !=\ 0)\ std::cout\ <<\ "{}slow\ lane\ current:\ "{}\ <<\ next\_dvq\_slow\_length\ \ <<\ "{}slow\_max:\ "{}\ <<\ next\_dvq\_slow\_max\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00644}00644\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ pressure2)\ pressure1\ =\ pressure2;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00645}00645\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (pressure1\ >\ 0.2)\ std::cout\ <<\ pressure1\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00646}00646\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ minPressure)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00647}00647\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00648}00648\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ minPressure\ =\ pressure1;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00649}00649\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ selectIndex\ =\ k;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00650}00650\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00651}00651\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00652}00652\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00653}00653\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00654}00654\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00655}00655\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ //\ back\ pressure\ +\ random\ selection}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00656}00656\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ selectIndex\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00657}00657\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ double\ minPressure\ =\ 1.0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00658}00658\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ uint32\_t\ k\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00659}00659\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ for\ (RouteVecCI\_t\ i\ =\ allRoutes.begin\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00660}00660\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ i\ !=\ allRoutes.end\ ();\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00661}00661\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ i++,\ k\ ++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00662}00662\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00663}00663\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ //\ get\ the\ output\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00664}00664\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ Ptr\ <NetDevice>\ dev\ =\ m\_ipv4-\/>GetNetDevice\ ((*i)-\/>GetInterface\ ());\ \ \ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00665}00665\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ //\ get\ the\ nexthop\ queue\ infomation}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00666}00666\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ Ptr<Channel>\ channel\ =\ dev-\/>GetChannel\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00667}00667\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ PointToPointChannel\ *p2pchannel\ =\ dynamic\_cast\ <PointToPointChannel\ *>\ (PeekPointer\ (channel));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00668}00668\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ if\ (p2pchannel\ !=\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00669}00669\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00670}00670\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ Ptr<Node>\ node\ =\ dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00671}00671\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ Ptr<PointToPointNetDevice>\ d\_dev\ =\ p2pchannel-\/>GetDestination\ (0)\ ==\ dev\ ?\ p2pchannel-\/>GetDestination\ (1)\ :\ p2pchannel-\/>GetDestination\ (0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00672}00672\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ Ptr<Node>\ d\_node\ =\ d\_dev-\/>GetNode\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00673}00673\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ if\ ((*i)-\/>GetNextInterface\ ()\ !=\ 0xffffffff)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00674}00674\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00675}00675\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ next\_dev\ =\ d\_node-\/>GetDevice\ ((*i)-\/>GetNextInterface\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00676}00676\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}next\ node:\ "{}\ <<\ d\_node-\/>GetId\ ()\ <<\ "{}next\ interface:\ "{}\ <<\ (*i)-\/>GetNextInterface\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00677}00677\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ next\_disc\ =\ d\_node-\/>GetObject<TrafficControlLayer>\ ()-\/>GetRootQueueDiscOnDevice\ (next\_dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00678}00678\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRVirtualQueueDisc>\ next\_dvq\ =\ DynamicCast\ <DGRVirtualQueueDisc>\ (next\_disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00679}00679\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_length\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00680}00680\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_max\ =\ next\_dvq-\/>GetInternalQueue\ (1)-\/>GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00681}00681\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ next\_dvq\_slow\_length\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>GetCurrentSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00682}00682\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ uint32\_t\ next\_dvq\_slow\_max\ =\ next\_dvq-\/>GetInternalQueue\ (2)-\/>\ GetMaxSize\ ().GetValue\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00683}00683\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure1\ =\ next\_dvq\_length*1.0/next\_dvq\_max;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00684}00684\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ double\ pressure2\ =\ next\_dvq\_slow\_length*1.0/155;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00685}00685\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (next\_dvq\_slow\_length\ !=\ 0)\ std::cout\ <<\ "{}slow\ lane\ current:\ "{}\ <<\ next\_dvq\_slow\_length\ \ <<\ "{}slow\_max:\ "{}\ <<\ next\_dvq\_slow\_max\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00686}00686\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ pressure2)\ pressure1\ =\ pressure2;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00687}00687\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ //\ if\ (pressure1\ >\ 0.2)\ std::cout\ <<\ pressure1\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00688}00688\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (pressure1\ <\ minPressure)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00689}00689\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00690}00690\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ minPressure\ =\ pressure1;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00691}00691\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ selectIndex\ =\ k;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00692}00692\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00693}00693\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00694}00694\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00695}00695\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00696}00696\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00697}00697\ \textcolor{comment}{//\ \ \ \ \ \ \ Ipv4DGRRoutingTableEntry*\ route\ =\ allRoutes.at\ (selectIndex);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00698}00698\ \textcolor{comment}{//\ \ \ \ \ \ \ rtentry\ =\ Create<Ipv4Route>\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00699}00699\ \textcolor{comment}{//\ \ \ \ \ \ \ rtentry-\/>SetDestination\ (route-\/>GetDest\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00700}00700\ \textcolor{comment}{//\ \ \ \ \ \ \ ///\ \(\backslash\)todo\ handle\ multi-\/address\ case}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00701}00701\ \textcolor{comment}{//\ \ \ \ \ \ \ rtentry-\/>SetSource\ (m\_ipv4-\/>GetAddress\ (route-\/>GetInterface\ (),\ 0).GetLocal\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00702}00702\ \textcolor{comment}{//\ \ \ \ \ \ \ rtentry-\/>SetGateway\ (route-\/>GetGateway\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00703}00703\ \textcolor{comment}{//\ \ \ \ \ \ \ uint32\_t\ interfaceIdx\ =\ route-\/>GetInterface\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00704}00704\ \textcolor{comment}{//\ \ \ \ \ \ \ rtentry-\/>SetOutputDevice\ (m\_ipv4-\/>GetNetDevice\ (interfaceIdx));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00705}00705\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ if\ (route-\/>GetDistance\ ()\ >\ 30000)\ std::cout\ <<\ "{}budget:\ "{}\ <<\ bgt\ <<\ "{}\ distance:\ "{}\ <<\ route-\/>GetDistance\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00706}00706\ \textcolor{comment}{//\ \ \ \ \ \ \ if\ (bgt\ -\/\ route-\/>GetDistance\ ()\ <=\ 20)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00707}00707\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00708}00708\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ prioTag.SetPriority\ (0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00709}00709\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00710}00710\ \textcolor{comment}{//\ \ \ \ \ \ \ else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00711}00711\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00712}00712\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ prioTag.SetPriority\ (1);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00713}00713\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00714}00714\ \textcolor{comment}{//\ \ \ \ \ \ \ distTag.SetDistance\ (route-\/>GetDistance\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00715}00715\ \textcolor{comment}{//\ \ \ \ \ \ \ p-\/>ReplacePacketTag\ (prioTag);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00716}00716\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00717}00717\ \textcolor{comment}{//\ \ \ \ \ \ \ p-\/>ReplacePacketTag\ (distTag);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00718}00718\ \textcolor{comment}{//\ \ \ \ \ \ \ return\ rtentry;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00719}00719\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00720}00720\ \textcolor{comment}{//\ \ \ else\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00721}00721\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00722}00722\ \textcolor{comment}{//\ \ \ \ \ \ \ return\ 0;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00723}00723\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00724}00724\ \textcolor{comment}{//\ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00725}00725\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00726}00726\ uint32\_t\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00727}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3558caabfea9b5e9f27ccea4bb2b6603}{00727}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3558caabfea9b5e9f27ccea4bb2b6603}{Ipv4DGRRouting::GetNRoutes}}\ (\textcolor{keywordtype}{void})\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00728}00728\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00729}00729\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00730}00730\ \ \ uint32\_t\ n\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00731}00731\ \ \ n\ +=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00732}00732\ \ \ n\ +=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00733}00733\ \ \ n\ +=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00734}00734\ \ \ \textcolor{keywordflow}{return}\ n;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00735}00735\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00736}00736\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00737}00737\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ *}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00738}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_ac186d277e77bbdfb2bc216691eefbbab}{00738}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_ac186d277e77bbdfb2bc216691eefbbab}{Ipv4DGRRouting::GetRoute}}\ (uint32\_t\ index)\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00739}00739\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00740}00740\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ index);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00741}00741\ \ \ \textcolor{keywordflow}{if}\ (index\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00742}00742\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00743}00743\ \ \ \ \ \ \ uint32\_t\ tmp\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00744}00744\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a619144f0acc141bc74ae09ace488009a}{HostRoutesCI}}\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00745}00745\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00746}00746\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00747}00747\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00748}00748\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tmp\ \ ==\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00749}00749\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00750}00750\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00751}00751\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00752}00752\ \ \ \ \ \ \ \ \ \ \ tmp++;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00753}00753\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00754}00754\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00755}00755\ \ \ index\ -\/=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00756}00756\ \ \ uint32\_t\ tmp\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00757}00757\ \ \ \textcolor{keywordflow}{if}\ (index\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00758}00758\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00759}00759\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a946d8c87ff42387b8aa817fe09bd838e}{NetworkRoutesCI}}\ j\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00760}00760\ \ \ \ \ \ \ \ \ \ \ \ j\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.end\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00761}00761\ \ \ \ \ \ \ \ \ \ \ \ j++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00762}00762\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00763}00763\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tmp\ ==\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00764}00764\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00765}00765\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *j;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00766}00766\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00767}00767\ \ \ \ \ \ \ \ \ \ \ tmp++;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00768}00768\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00769}00769\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00770}00770\ \ \ index\ -\/=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00771}00771\ \ \ tmp\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00772}00772\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a50f6d06d84b83009e0b0a8fe170bc5d1}{ASExternalRoutesCI}}\ k\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00773}00773\ \ \ \ \ \ \ \ k\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00774}00774\ \ \ \ \ \ \ \ k++)\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00775}00775\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00776}00776\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tmp\ ==\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00777}00777\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00778}00778\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *k;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00779}00779\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00780}00780\ \ \ \ \ \ \ tmp++;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00781}00781\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00782}00782\ \ \ NS\_ASSERT\ (\textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00783}00783\ \ \ \textcolor{comment}{//\ quiet\ compiler.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00784}00784\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00785}00785\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00786}00786\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00787}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a55aea61c57e39ba4756d22d4e646cd3e}{00787}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a55aea61c57e39ba4756d22d4e646cd3e}{Ipv4DGRRouting::RemoveRoute}}\ (uint32\_t\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00788}00788\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00789}00789\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ index);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00790}00790\ \ \ \textcolor{keywordflow}{if}\ (index\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00791}00791\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00792}00792\ \ \ \ \ \ \ uint32\_t\ tmp\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00793}00793\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8fe42d90325ac5879408d2257ce57c47}{HostRoutesI}}\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00794}00794\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00795}00795\ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}++)\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00796}00796\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00797}00797\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tmp\ \ ==\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00798}00798\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00799}00799\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Removing\ route\ "{}}\ <<\ index\ <<\ \textcolor{stringliteral}{"{};\ size\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00800}00800\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ *\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00801}00801\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.erase\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00802}00802\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Done\ removing\ host\ route\ "{}}\ <<\ index\ <<\ \textcolor{stringliteral}{"{};\ host\ route\ remaining\ size\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00803}00803\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00804}00804\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00805}00805\ \ \ \ \ \ \ \ \ \ \ tmp++;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00806}00806\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00807}00807\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00808}00808\ \ \ index\ -\/=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00809}00809\ \ \ uint32\_t\ tmp\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00810}00810\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a0521ee280d49058fdcf8b38bf550dd34}{NetworkRoutesI}}\ j\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00811}00811\ \ \ \ \ \ \ \ j\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00812}00812\ \ \ \ \ \ \ \ j++)\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00813}00813\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00814}00814\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tmp\ ==\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00815}00815\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00816}00816\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Removing\ route\ "{}}\ <<\ index\ <<\ \textcolor{stringliteral}{"{};\ size\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00817}00817\ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ *j;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00818}00818\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.erase\ (j);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00819}00819\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Done\ removing\ network\ route\ "{}}\ <<\ index\ <<\ \textcolor{stringliteral}{"{};\ network\ route\ remaining\ size\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00820}00820\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00821}00821\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00822}00822\ \ \ \ \ \ \ tmp++;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00823}00823\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00824}00824\ \ \ index\ -\/=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00825}00825\ \ \ tmp\ =\ 0;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00826}00826\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a14c8aee9a70a6fbb8f1ea784689838d2}{ASExternalRoutesI}}\ k\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00827}00827\ \ \ \ \ \ \ \ k\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.end\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00828}00828\ \ \ \ \ \ \ \ k++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00829}00829\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00830}00830\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tmp\ ==\ index)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00831}00831\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00832}00832\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Removing\ route\ "{}}\ <<\ index\ <<\ \textcolor{stringliteral}{"{};\ size\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00833}00833\ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}\ *k;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00834}00834\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.erase\ (k);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00835}00835\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Done\ removing\ network\ route\ "{}}\ <<\ index\ <<\ \textcolor{stringliteral}{"{};\ network\ route\ remaining\ size\ =\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.size\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00836}00836\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00837}00837\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00838}00838\ \ \ \ \ \ \ tmp++;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00839}00839\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00840}00840\ \ \ NS\_ASSERT\ (\textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00841}00841\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00842}00842\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00843}00843\ int64\_t}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00844}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a54fc1b9c309b92d6d2e6c193752eb4bc}{00844}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a54fc1b9c309b92d6d2e6c193752eb4bc}{Ipv4DGRRouting::AssignStreams}}\ (int64\_t\ stream)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00845}00845\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00846}00846\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ stream);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00847}00847\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a92e2368664df1213c26bafd520582032}{m\_rand}}-\/>SetStream\ (stream);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00848}00848\ \ \ \textcolor{keywordflow}{return}\ 1;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00849}00849\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00850}00850\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00851}00851\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00852}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a258dcb9de99bd828247e0d6c3e08793d}{00852}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a258dcb9de99bd828247e0d6c3e08793d}{Ipv4DGRRouting::DoDispose}}\ (\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00853}00853\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00854}00854\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00855}00855\ \ \ \textcolor{comment}{//\ TODO:\ Realise\ memorys\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00856}00856\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8fe42d90325ac5879408d2257ce57c47}{HostRoutesI}}\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00857}00857\ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00858}00858\ \ \ \ \ \ \ \ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a93f4dd2543d12d9466bbd7b6131e0580}{m\_hostRoutes}}.erase\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}))\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00859}00859\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00860}00860\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ (*i);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00861}00861\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00862}00862\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a0521ee280d49058fdcf8b38bf550dd34}{NetworkRoutesI}}\ j\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00863}00863\ \ \ \ \ \ \ \ j\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.end\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00864}00864\ \ \ \ \ \ \ \ j\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_adf7379affaf0463cb351765b3caf8dae}{m\_networkRoutes}}.erase\ (j))\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00865}00865\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00866}00866\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ (*j);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00867}00867\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00868}00868\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a14c8aee9a70a6fbb8f1ea784689838d2}{ASExternalRoutesI}}\ l\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.begin\ ();\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00869}00869\ \ \ \ \ \ \ \ l\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.end\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00870}00870\ \ \ \ \ \ \ \ l\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3a1304dc7321af8536c44840257b8f50}{m\_ASexternalRoutes}}.erase\ (l))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00871}00871\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00872}00872\ \ \ \ \ \ \ \textcolor{keyword}{delete}\ (*l);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00873}00873\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00874}00874\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00875}00875\ \ \ Ipv4RoutingProtocol::DoDispose\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00876}00876\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00877}00877\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00878}00878\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00879}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a0bb01e6d6468d3c42a989434c193b372}{00879}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a0bb01e6d6468d3c42a989434c193b372}{Ipv4DGRRouting::DoInitialize}}\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00880}00880\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00881}00881\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00882}00882\ \ \ \textcolor{comment}{//\ bool\ addedGlobal\ =\ false;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00883}00883\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a04c3b50d4a0ccec4f1422d0af4410b8f}{m\_initialized}}\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00884}00884\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00885}00885\ \ \ \textcolor{comment}{//\ To\ Check:\ An\ random\ value\ is\ needed\ to\ initialize\ the\ protocol?}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00886}00886\ \ \ Time\ delay\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa6cef6ca1b8081689f2c63246b96eacb}{m\_unsolicitedUpdate}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00887}00887\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3e0c7233d7c81a2ee3890506bd45e4a8}{m\_nextUnsolicitedUpdate}}\ =\ Simulator::Schedule\ (delay,\ \&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a238052760f17cb9a493e98ef38b6de8f}{Ipv4DGRRouting::SendUnsolicitedUpdate}},\ \textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00888}00888\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00889}00889\ \ \ uint32\_t\ nodeId\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (1)-\/>GetNode\ ()-\/>GetId\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00890}00890\ \ \ std::stringstream\ ss;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00891}00891\ \ \ ss\ <<\ nodeId;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00892}00892\ \ \ std::string\ strNodeId\ =\ ss.str();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00893}00893\ \ \ \textcolor{comment}{//\ std::string\ node\ =\ "{}Node\ "{}\ +\ (std::string)nodeId;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00894}00894\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_ac1ef824e03b0393dcad185295ef373f6}{m\_outStream}}\ =\ Create<OutputStreamWrapper>\ (\textcolor{stringliteral}{"{}Node"{}}\ +\ strNodeId\ +\ \textcolor{stringliteral}{"{}queueStatusErr.txt"{}},\ std::ios::out);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00895}00895\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00896}00896\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00897}00897\ \ \ \textcolor{comment}{//\ m\_nextUnsolicitedUpdate\ =\ Simulator::Schedule\ (delay,\ \&Ipv4DGRRouting::SendUnsolicitedUpdate,\ this);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00898}00898\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00899}00899\ \ \ \textcolor{comment}{//\ Initialize\ the\ sockets\ for\ every\ netdevice}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00900}00900\ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNInterfaces\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ ++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00901}00901\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00902}00902\ \ \ \ \ \ \ Ptr<LoopbackNetDevice>\ check\ =\ DynamicCast<LoopbackNetDevice>(\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00903}00903\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (check)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00904}00904\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00905}00905\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00906}00906\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00907}00907\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00908}00908\ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ activeInterface\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00909}00909\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8656e82eb3ad70826fc72f14d85bfab6}{m\_interfaceExclusions}}.find\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})\ ==\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8656e82eb3ad70826fc72f14d85bfab6}{m\_interfaceExclusions}}.end\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00910}00910\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00911}00911\ \ \ \ \ \ \ \ \ \ \ activeInterface\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00912}00912\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>SetForwarding\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}},\ \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00913}00913\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00914}00914\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00915}00915\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNAddresses\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});\ j\ ++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00916}00916\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00917}00917\ \ \ \ \ \ \ \ \ \ \ Ipv4InterfaceAddress\ address\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetAddress\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}},\ j);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00918}00918\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}For\ interface:\ "{}}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <<\ \textcolor{stringliteral}{"{}the\ "{}}\ <<\ j\ <<\ \textcolor{stringliteral}{"{}st\ Address\ is\ "{}}\ <<\ address);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00919}00919\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}For\ interface:\ "{}\ <<\ i\ <<\ "{}\ the\ "{}\ <<\ j\ <<\ "{}st\ Address\ is\ "{};}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00920}00920\ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00921}00921\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (address.GetScope\ ()\ !=\ Ipv4InterfaceAddress::HOST\ \&\&\ activeInterface\ ==\ \textcolor{keyword}{true})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00922}00922\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00923}00923\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}DGR:\ add\ socket\ to\ "{}}\ <<\ address.GetLocal\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00924}00924\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TypeId\ tid\ =\ TypeId::LookupByName\ (\textcolor{stringliteral}{"{}ns3::UdpSocketFactory"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00925}00925\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Node>\ theNode\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00926}00926\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<Socket>\ socket\ =\ Socket::CreateSocket\ (theNode,\ tid);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00927}00927\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00928}00928\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InetSocketAddress\ local\ =\ InetSocketAddress\ (address.GetLocal\ (),\ \mbox{\hyperlink{ipv4-dgr-routing_8cc_a52dae417495c2e56cb353b2adfe23deb}{DGR\_PORT}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00929}00929\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ socket-\/>BindToNetDevice\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00930}00930\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ ret\ =\ socket-\/>Bind\ (local);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00931}00931\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (ret\ ==\ 0,\ \textcolor{stringliteral}{"{}Bind\ unsuccessful"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00932}00932\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00933}00933\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ socket-\/>SetRecvCallback\ (MakeCallback\ (\&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a2eb8a683180ce3d3726767f5b986e3d8}{Ipv4DGRRouting::Receive}},\ \textcolor{keyword}{this}));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00934}00934\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ socket-\/>SetIpRecvTtl\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00935}00935\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ socket-\/>SetRecvPktInfo\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00936}00936\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00937}00937\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_acf002938df9649de6e46caba3212d52a}{m\_unicastSocketList}}[socket]\ =\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00938}00938\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00939}00939\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00940}00940\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00941}00941\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00942}00942\ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00943}00943\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00944}00944\ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}DGR:\ adding\ receiving\ socket"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00945}00945\ \ \ \ \ \ \ \ \ TypeId\ tid\ =\ TypeId::LookupByName\ (\textcolor{stringliteral}{"{}ns3::UdpSocketFactory"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00946}00946\ \ \ \ \ \ \ \ \ Ptr<Node>\ theNode\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00947}00947\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}}\ =\ Socket::CreateSocket\ (theNode,\ tid);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00948}00948\ \ \ \ \ \ \ \ \ InetSocketAddress\ local\ =\ InetSocketAddress\ (\mbox{\hyperlink{ipv4-dgr-routing_8cc_ad1091203cec743531394bb68c50304ba}{DGR\_BROAD\_CAST}},\ \mbox{\hyperlink{ipv4-dgr-routing_8cc_a52dae417495c2e56cb353b2adfe23deb}{DGR\_PORT}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00949}00949\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}}-\/>Bind\ (local);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00950}00950\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}}-\/>SetRecvCallback\ (MakeCallback\ (\&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a2eb8a683180ce3d3726767f5b986e3d8}{Ipv4DGRRouting::Receive}},\ \textcolor{keyword}{this}));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00951}00951\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}}-\/>SetIpRecvTtl\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00952}00952\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}}-\/>SetRecvPktInfo\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00953}00953\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00954}00954\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00955}00955\ \ \ \ \ \textcolor{comment}{//\ if\ (addedGlobal)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00956}00956\ \ \ \ \ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00957}00957\ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ Time\ delay\ =\ Seconds\ (m\_rand-\/>GetValue\ (m\_minTriggeredUpdateDelay.GetSeconds\ (),}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00958}00958\ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ m\_maxTriggeredUpdateDelay.GetSeconds\ ()));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00959}00959\ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ m\_nextTriggeredUpdate\ =\ Simulator::Schedule\ (delay,\ \&Ipv4DGRRouting::DoSendNeighborStatusUpdate,\ this,\ false);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00960}00960\ \ \ \ \ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00961}00961\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00962}00962\ \ \ \ \ \textcolor{comment}{//\ delay\ =\ Seconds\ (m\_rand-\/>GetValue\ (0.01,\ m\_startupDelay.GetSeconds\ ()));}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00963}00963\ \ \ \ \ \textcolor{comment}{//\ m\_nextTriggeredUpdate\ =\ Simulator::Schedule\ (delay,\ \&Ipv4DGRRouting::SendNeighborStatusRequest,\ this);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00964}00964\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00965}00965\ \ \ \ \ Ipv4RoutingProtocol::DoInitialize\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00966}00966\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00967}00967\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00968}00968\ \textcolor{comment}{//\ Formatted\ like\ output\ of\ "{}route\ -\/n"{}\ command}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00969}00969\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00970}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a0670297c54c9f0715d5d90a0cafc529d}{00970}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a0670297c54c9f0715d5d90a0cafc529d}{Ipv4DGRRouting::PrintRoutingTable}}\ (Ptr<OutputStreamWrapper>\ stream,\ Time::Unit\ unit)\textcolor{keyword}{\ const}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00971}00971\ \textcolor{keyword}{}\{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00972}00972\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ stream);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00973}00973\ \ \ std::ostream*\ os\ =\ stream-\/>GetStream\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00974}00974\ \ \ \textcolor{comment}{//\ Copy\ the\ current\ ostream\ state}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00975}00975\ \ \ std::ios\ oldState\ (\textcolor{keyword}{nullptr});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00976}00976\ \ \ oldState.copyfmt\ (*os);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00977}00977\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00978}00978\ \ \ *os\ <<\ \textcolor{stringliteral}{"{}Node:\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ()-\/>GetId\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00979}00979\ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{},\ Time:\ "{}}\ <<\ Now().As\ (unit)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00980}00980\ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{},\ Local\ time:\ "{}}\ <<\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ()-\/>GetLocalTime\ ().As\ (unit)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00981}00981\ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{},\ Ipv4DGRRouting\ table"{}}\ <<\ std::endl;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00982}00982\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00983}00983\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3558caabfea9b5e9f27ccea4bb2b6603}{GetNRoutes}}\ ()\ >\ 0)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00984}00984\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00985}00985\ \ \ \ \ \ \ *os\ <<\ \textcolor{stringliteral}{"{}\ \ Destination\ \ \ \ \ Gateway\ \ \ \ Flags\ \ \ Metric\ \ Iface\ \ \ NextIface"{}}\ <<\ std::endl;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00986}00986\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ j\ =\ 0;\ j\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3558caabfea9b5e9f27ccea4bb2b6603}{GetNRoutes}}\ ();\ j++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00987}00987\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00988}00988\ \ \ \ \ \ \ \ \ \ \ std::ostringstream\ dest,\ gw,\ mask,\ flags,\ metric;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00989}00989\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry}{Ipv4DGRRoutingTableEntry}}\ route\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_ac186d277e77bbdfb2bc216691eefbbab}{GetRoute}}\ (j);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00990}00990\ \ \ \ \ \ \ \ \ \ \ dest\ <<\ route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a69ebd01d00df5465ad4d720baf20aac5}{GetDest}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00991}00991\ \ \ \ \ \ \ \ \ \ \ *os\ \ <<\ std::setw\ (13)\ <<\ dest.str\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00992}00992\ \ \ \ \ \ \ \ \ \ \ gw\ <<\ route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a19708a359b875e0b8986ff99f80c159c}{GetGateway}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00993}00993\ \ \ \ \ \ \ \ \ \ \ *os\ \ <<\ std::setw\ (13)\ <<\ gw.str\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00994}00994\ \ \ \ \ \ \ \ \ \ \ flags\ <<\ \textcolor{stringliteral}{"{}U"{}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00995}00995\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_aae4aa136bdffbf9f64f756fec615ecbb}{IsHost}}\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00996}00996\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00997}00997\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ flags\ <<\ \textcolor{stringliteral}{"{}H"{}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00998}00998\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l00999}00999\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ace7333037444806516277fc945e43c69}{IsGateway}}\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01000}01000\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01001}01001\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ flags\ <<\ \textcolor{stringliteral}{"{}G"{}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01002}01002\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01003}01003\ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::setiosflags\ (std::ios::left)\ <<\ std::setw\ (6)\ <<\ flags.str\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01004}01004\ \ \ \ \ \ \ \ \ \ \ metric\ <<\ route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ad6b6cd8c1a98ab084553075f284de1b4}{GetDistance}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01005}01005\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_ad6b6cd8c1a98ab084553075f284de1b4}{GetDistance}}\ ()\ ==\ 0xffffffff)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01006}01006\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01007}01007\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::setw\ (9)\ <<\ \textcolor{stringliteral}{"{}-\/"{}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01008}01008\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01009}01009\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01010}01010\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01011}01011\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::setw(9)\ <<\ metric.str();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01012}01012\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01013}01013\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01014}01014\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (Names::FindName\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a2b9549ad4a8d225b40c3f7dcd2c29c25}{GetInterface}}\ ()))\ !=\ \textcolor{stringliteral}{"{}"{}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01015}01015\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01016}01016\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *os\ <<\ Names::FindName\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a2b9549ad4a8d225b40c3f7dcd2c29c25}{GetInterface}}\ ()));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01017}01017\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01018}01018\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01019}01019\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01020}01020\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::setw\ (7)\ <<\ route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a2b9549ad4a8d225b40c3f7dcd2c29c25}{GetInterface}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01021}01021\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a327e4e2e11fd01986fc128e9ee8e90bc}{GetNextInterface}}\ ()\ !=\ 0xffffffff)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01022}01022\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01023}01023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::setw\ (8)\ <<\ route.\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_table_entry_a327e4e2e11fd01986fc128e9ee8e90bc}{GetNextInterface}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01024}01024\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01025}01025\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01026}01026\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01027}01027\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::setw\ (8)\ <<\ \textcolor{stringliteral}{"{}-\/"{}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01028}01028\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01029}01029\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01030}01030\ \ \ \ \ \ \ \ \ \ \ *os\ <<\ std::endl;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01031}01031\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01032}01032\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01033}01033\ \ \ *os\ <<\ std::endl;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01034}01034\ \ \ (*os).copyfmt\ (oldState);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01035}01035\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01036}01036\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01037}01037\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01038}01038\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01039}01039\ Ptr<Ipv4Route>}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01040}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa949f02ca52008f8201ee9915fdd0191}{01040}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa949f02ca52008f8201ee9915fdd0191}{Ipv4DGRRouting::RouteOutput}}\ (Ptr<Packet>\ p,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01041}01041\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ Ipv4Header\ \&header,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01042}01042\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ oif,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01043}01043\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Socket::SocketErrno\ \&sockerr)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01044}01044\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01045}01045\ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}at\ Node:\ "{}\ <<\ m\_ipv4-\/>GetNetDevice\ (0)-\/>GetNode\ ()-\/>GetId\ ()\ <<\ "{}RouteOutput"{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01046}01046\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ p\ <<\ \&header\ <<\ oif\ <<\ \&sockerr);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01047}01047\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01048}01048\ \ \ \textcolor{comment}{//\ First,\ see\ if\ this\ is\ a\ multicast\ packet\ we\ have\ a\ route\ for.\ \ If\ we}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01049}01049\ \ \ \textcolor{comment}{//\ have\ a\ route,\ then\ send\ the\ packet\ down\ each\ of\ the\ specified\ interfaces.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01050}01050\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01051}01051\ \ \ \textcolor{keywordflow}{if}\ (header.GetDestination\ ().IsMulticast\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01052}01052\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01053}01053\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Multicast\ destination-\/-\/\ returning\ false"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01054}01054\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;\ \textcolor{comment}{//\ Let\ other\ routing\ protocols\ try\ to\ handle\ this}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01055}01055\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01056}01056\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01057}01057\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01058}01058\ \ \ \textcolor{comment}{//\ See\ if\ this\ is\ a\ Delay-\/Guarenteed\ packet\ we\ have\ a\ route\ for.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01059}01059\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01060}01060\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Delay-\/Guarenteed\ destination-\/\ looking\ up"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01061}01061\ \ \ Ptr<Ipv4Route>\ rtentry;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01062}01062\ \ \ \mbox{\hyperlink{classns3_1_1_budget_tag}{BudgetTag}}\ budgetTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01063}01063\ \ \ \textcolor{keywordflow}{if}\ (!p)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01064}01064\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01065}01065\ \ \ \ \ \ \ rtentry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a95ddcbfcdb50ecdb48bfd91575836fe6}{LookupUniRoute}}\ (header.GetDestination\ (),\ oif);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01066}01066\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01067}01067\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (p-\/>PeekPacketTag\ (budgetTag))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01068}01068\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01069}01069\ \ \ \ \ \ \ rtentry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a552819000c07190404d6bd5db6d1ce84}{LookupDGRRoute}}\ (header.GetDestination\ (),\ p,\ oif);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01070}01070\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01071}01071\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01072}01072\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01073}01073\ \ \ \ \ \ \ rtentry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a95ddcbfcdb50ecdb48bfd91575836fe6}{LookupUniRoute}}\ (header.GetDestination\ (),\ oif);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01074}01074\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01075}01075\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01076}01076\ \ \ \textcolor{keywordflow}{if}\ (rtentry)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01077}01077\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01078}01078\ \ \ \ \ \ \ sockerr\ =\ Socket::ERROR\_NOTERROR;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01079}01079\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01080}01080\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01081}01081\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01082}01082\ \ \ \ \ \ \ sockerr\ =\ Socket::ERROR\_NOROUTETOHOST;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01083}01083\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01084}01084\ \ \ \textcolor{keywordflow}{return}\ rtentry;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01085}01085\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01086}01086\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01087}01087\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01088}01088\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01089}01089\ \textcolor{comment}{//\ bool\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01090}01090\ \textcolor{comment}{//\ Ipv4DGRRouting::RouteInput\ \ (Ptr<const\ Packet>\ p,\ const\ Ipv4Header\ \&header,\ Ptr<const\ NetDevice>\ idev,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01091}01091\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ UnicastForwardCallback\ ucb,\ MulticastForwardCallback\ mcb,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01092}01092\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LocalDeliverCallback\ lcb,\ ErrorCallback\ ecb)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01093}01093\ \textcolor{comment}{//\ \{\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01094}01094\ \textcolor{comment}{//\ \ \ Ptr\ <Packet>\ p\_copy\ =\ p-\/>Copy();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01095}01095\ \textcolor{comment}{//\ \ \ NS\_LOG\_FUNCTION\ (this\ <<\ p\ <<\ header\ <<\ header.GetSource\ ()\ <<\ header.GetDestination\ ()\ <<\ idev\ <<\ \&lcb\ <<\ \&ecb);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01096}01096\ \textcolor{comment}{//\ \ \ //\ Check\ if\ input\ device\ supports\ IP}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01097}01097\ \textcolor{comment}{//\ \ \ NS\_ASSERT\ (m\_ipv4-\/>GetInterfaceForDevice\ (idev)\ >=\ 0);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01098}01098\ \textcolor{comment}{//\ \ \ uint32\_t\ iif\ =\ m\_ipv4-\/>GetInterfaceForDevice\ (idev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01099}01099\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01100}01100\ \textcolor{comment}{//\ \ \ if\ (m\_ipv4-\/>IsDestinationAddress\ (header.GetDestination\ (),\ iif))}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01101}01101\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01102}01102\ \textcolor{comment}{//\ \ \ \ \ \ \ if\ (!lcb.IsNull\ ())}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01103}01103\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01104}01104\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Local\ delivery\ to\ "{}\ <<\ header.GetDestination\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01105}01105\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}Local\ delivery\ to\ "{}\ <<\ header.GetDestination\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01106}01106\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ lcb\ (p,\ header,\ iif);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01107}01107\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ return\ true;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01108}01108\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01109}01109\ \textcolor{comment}{//\ \ \ \ \ \ \ else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01110}01110\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01111}01111\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ The\ local\ delivery\ callback\ is\ null.\ \ This\ may\ be\ a\ multicast}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01112}01112\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ or\ broadcast\ packet,\ so\ return\ false\ so\ that\ another}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01113}01113\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ multicast\ routing\ protocol\ can\ handle\ it.\ \ It\ should\ be\ possible}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01114}01114\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ to\ extend\ this\ to\ explicitly\ check\ whether\ it\ is\ a\ unicast}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01115}01115\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ packet,\ and\ invoke\ the\ error\ callback\ if\ so}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01116}01116\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ std::cout\ <<\ "{}ERROR\ !!!!"{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01117}01117\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ return\ false;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01118}01118\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01119}01119\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01120}01120\ \textcolor{comment}{//\ \ \ //\ Check\ if\ input\ device\ supports\ IP\ forwarding}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01121}01121\ \textcolor{comment}{//\ \ \ if\ (m\_ipv4-\/>IsForwarding\ (iif)\ ==\ false)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01122}01122\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01123}01123\ \textcolor{comment}{//\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Forwarding\ disabled\ for\ this\ interface"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01124}01124\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ std::cout\ <<\ "{}RI:\ Forwarding\ disabled\ for\ this\ interface"{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01125}01125\ \textcolor{comment}{//\ \ \ \ \ \ \ ecb\ (p,\ header,\ Socket::ERROR\_NOROUTETOHOST);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01126}01126\ \textcolor{comment}{//\ \ \ \ \ \ \ return\ true;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01127}01127\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01128}01128\ \textcolor{comment}{//\ \ \ //\ Next,\ try\ to\ find\ a\ route}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01129}01129\ \textcolor{comment}{//\ \ \ NS\_LOG\_LOGIC\ ("{}Unicast\ destination-\/\ looking\ up\ global\ route"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01130}01130\ \textcolor{comment}{//\ \ \ Ptr<Ipv4Route>\ rtentry;\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01131}01131\ \textcolor{comment}{//\ \ \ BudgetTag\ budgetTag;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01132}01132\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01133}01133\ \textcolor{comment}{//\ \ \ if\ (p-\/>PeekPacketTag\ (budgetTag)\ \&\&\ budgetTag.GetBudget\ ()\ !=\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01134}01134\ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01135}01135\ \textcolor{comment}{//\ \ \ \ \ rtentry\ =\ LookupDGRRoute\ (header.GetDestination\ (),\ p\_copy,\ idev);\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01136}01136\ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01137}01137\ \textcolor{comment}{//\ \ \ else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01138}01138\ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01139}01139\ \textcolor{comment}{//\ \ \ \ \ rtentry\ =\ LookupUniRoute\ (header.GetDestination\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01140}01140\ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01141}01141\ \textcolor{comment}{//\ \ \ if\ (rtentry)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01142}01142\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01143}01143\ \textcolor{comment}{//\ \ \ \ \ \ \ const\ Ptr\ <Packet>\ p\_c\ =\ p\_copy-\/>Copy();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01144}01144\ \textcolor{comment}{//\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Found\ unicast\ destination-\/\ calling\ unicast\ callback"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01145}01145\ \textcolor{comment}{//\ \ \ \ \ \ \ ucb\ (rtentry,\ p\_c,\ header);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01146}01146\ \textcolor{comment}{//\ \ \ \ \ \ \ return\ true;\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01147}01147\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01148}01148\ \textcolor{comment}{//\ \ \ else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01149}01149\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01150}01150\ \textcolor{comment}{//\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}Did\ not\ find\ unicast\ destination-\/\ returning\ false"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01151}01151\ \textcolor{comment}{//\ \ \ \ \ \ \ return\ false;\ //\ Let\ other\ routing\ protocols\ try\ to\ handle\ this}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01152}01152\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ route\ request.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01153}01153\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01154}01154\ \textcolor{comment}{//\ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01155}01155\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01156}01156\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01157}01157\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01158}01158\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01159}01159\ \textcolor{keywordtype}{bool}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01160}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a7e7c34d7e0a922980bf3fdf62f9bbe1b}{01160}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a7e7c34d7e0a922980bf3fdf62f9bbe1b}{Ipv4DGRRouting::RouteInput}}\ \ (Ptr<const\ Packet>\ p,\ \textcolor{keyword}{const}\ Ipv4Header\ \&header,\ Ptr<const\ NetDevice>\ idev,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01161}01161\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ UnicastForwardCallback\ ucb,\ MulticastForwardCallback\ mcb,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01162}01162\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LocalDeliverCallback\ lcb,\ ErrorCallback\ ecb)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01163}01163\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01164}01164\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ p\ <<\ header\ <<\ header.GetSource\ ()\ <<\ header.GetDestination\ ()\ <<\ idev\ <<\ \&lcb\ <<\ \&ecb);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01165}01165\ \ \ \textcolor{comment}{//\ Check\ if\ input\ device\ supports\ IP}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01166}01166\ \ \ NS\_ASSERT\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetInterfaceForDevice\ (idev)\ >=\ 0);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01167}01167\ \ \ uint32\_t\ iif\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetInterfaceForDevice\ (idev);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01168}01168\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01169}01169\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>IsDestinationAddress\ (header.GetDestination\ (),\ iif))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01170}01170\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01171}01171\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!lcb.IsNull\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01172}01172\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01173}01173\ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Local\ delivery\ to\ "{}}\ <<\ header.GetDestination\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01174}01174\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}Local\ delivery\ to\ "{}\ <<\ header.GetDestination\ ()\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01175}01175\ \ \ \ \ \ \ \ \ \ \ lcb\ (p,\ header,\ iif);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01176}01176\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01177}01177\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01178}01178\ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01179}01179\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01180}01180\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ The\ local\ delivery\ callback\ is\ null.\ \ This\ may\ be\ a\ multicast}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01181}01181\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ or\ broadcast\ packet,\ so\ return\ false\ so\ that\ another}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01182}01182\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ multicast\ routing\ protocol\ can\ handle\ it.\ \ It\ should\ be\ possible}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01183}01183\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ to\ extend\ this\ to\ explicitly\ check\ whether\ it\ is\ a\ unicast}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01184}01184\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ packet,\ and\ invoke\ the\ error\ callback\ if\ so}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01185}01185\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}ERROR\ !!!!"{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01186}01186\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01187}01187\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01188}01188\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01189}01189\ \ \ \textcolor{comment}{//\ Check\ if\ input\ device\ supports\ IP\ forwarding}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01190}01190\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>IsForwarding\ (iif)\ ==\ \textcolor{keyword}{false})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01191}01191\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01192}01192\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Forwarding\ disabled\ for\ this\ interface"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01193}01193\ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}RI:\ Forwarding\ disabled\ for\ this\ interface"{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01194}01194\ \ \ \ \ \ \ ecb\ (p,\ header,\ Socket::ERROR\_NOROUTETOHOST);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01195}01195\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01196}01196\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01197}01197\ \ \ \textcolor{comment}{//\ Next,\ try\ to\ find\ a\ route}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01198}01198\ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Unicast\ destination-\/\ looking\ up\ global\ route"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01199}01199\ \ \ Ptr<Ipv4Route>\ rtentry;\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01200}01200\ \ \ \mbox{\hyperlink{classns3_1_1_budget_tag}{BudgetTag}}\ budgetTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01201}01201\ \ \ Ptr\ <Packet>\ p\_copy;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01202}01202\ \ \ \textcolor{keywordflow}{if}\ (p-\/>PeekPacketTag\ (budgetTag))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01203}01203\ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01204}01204\ \ \ \ \ p\_copy\ =\ p-\/>Copy();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01205}01205\ \ \ \ \ rtentry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a552819000c07190404d6bd5db6d1ce84}{LookupDGRRoute}}\ (header.GetDestination\ (),\ p\_copy,\ idev);\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01206}01206\ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01207}01207\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01208}01208\ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01209}01209\ \ \ \ \ rtentry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a95ddcbfcdb50ecdb48bfd91575836fe6}{LookupUniRoute}}\ (header.GetDestination\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01210}01210\ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01211}01211\ \ \ \textcolor{keywordflow}{if}\ (rtentry)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01212}01212\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01213}01213\ \ \ \ \ \ \ \textcolor{comment}{//\ std::cout\ <<\ "{}find\ a\ way"{}\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01214}01214\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p\_copy)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01215}01215\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01216}01216\ \ \ \ \ \ \ \ \ p\ =\ p\_copy-\/>Copy();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01217}01217\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01218}01218\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Found\ unicast\ destination-\/\ calling\ unicast\ callback"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01219}01219\ \ \ \ \ \ \ ucb\ (rtentry,\ p,\ header);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01220}01220\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01221}01221\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01222}01222\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01223}01223\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01224}01224\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Did\ not\ find\ unicast\ destination-\/\ returning\ false"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01225}01225\ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};\ \textcolor{comment}{//\ Let\ other\ routing\ protocols\ try\ to\ handle\ this}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01226}01226\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ route\ request.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01227}01227\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01228}01228\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01229}01229\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01230}01230\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01231}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a9715cb5895be31d03b1ffe15212fec57}{01231}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a9715cb5895be31d03b1ffe15212fec57}{Ipv4DGRRouting::NotifyInterfaceUp}}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01232}01232\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01233}01233\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01234}01234\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a89c21e449a0c76b491a29fb1e1e81eb9}{m\_respondToInterfaceEvents}}\ \&\&\ Simulator::Now\ ().GetSeconds\ ()\ >\ 0)\ \ \textcolor{comment}{//\ avoid\ startup\ events}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01235}01235\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01236}01236\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_acea317a83af55525aa4453f33839db3a}{DGRRouteManager::DeleteDGRRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01237}01237\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_a62b76ca8cab68a61efd72c5fe5d092dc}{DGRRouteManager::BuildDGRRoutingDatabase}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01238}01238\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_ad637a566676faf22176f66f1afdb8c3c}{DGRRouteManager::InitializeRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01239}01239\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01240}01240\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01241}01241\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01242}01242\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01243}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a5fabc015fa802a4c056cf14359ea898e}{01243}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a5fabc015fa802a4c056cf14359ea898e}{Ipv4DGRRouting::NotifyInterfaceDown}}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01244}01244\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01245}01245\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01246}01246\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a89c21e449a0c76b491a29fb1e1e81eb9}{m\_respondToInterfaceEvents}}\ \&\&\ Simulator::Now\ ().GetSeconds\ ()\ >\ 0)\ \ \textcolor{comment}{//\ avoid\ startup\ events}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01247}01247\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01248}01248\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_acea317a83af55525aa4453f33839db3a}{DGRRouteManager::DeleteDGRRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01249}01249\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_a62b76ca8cab68a61efd72c5fe5d092dc}{DGRRouteManager::BuildDGRRoutingDatabase}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01250}01250\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_ad637a566676faf22176f66f1afdb8c3c}{DGRRouteManager::InitializeRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01251}01251\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01252}01252\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01253}01253\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01254}01254\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01255}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a9cdc7d3663a11b90bec029c7a3e6cba2}{01255}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a9cdc7d3663a11b90bec029c7a3e6cba2}{Ipv4DGRRouting::NotifyAddAddress}}\ (uint32\_t\ interface,\ Ipv4InterfaceAddress\ address)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01256}01256\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01257}01257\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ interface\ <<\ address);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01258}01258\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a89c21e449a0c76b491a29fb1e1e81eb9}{m\_respondToInterfaceEvents}}\ \&\&\ Simulator::Now\ ().GetSeconds\ ()\ >\ 0)\ \ \textcolor{comment}{//\ avoid\ startup\ events}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01259}01259\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01260}01260\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_acea317a83af55525aa4453f33839db3a}{DGRRouteManager::DeleteDGRRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01261}01261\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_a62b76ca8cab68a61efd72c5fe5d092dc}{DGRRouteManager::BuildDGRRoutingDatabase}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01262}01262\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_ad637a566676faf22176f66f1afdb8c3c}{DGRRouteManager::InitializeRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01263}01263\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01264}01264\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01265}01265\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01266}01266\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01267}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a45022db22ac734cfdde51a3a8bc0ecf1}{01267}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a45022db22ac734cfdde51a3a8bc0ecf1}{Ipv4DGRRouting::NotifyRemoveAddress}}\ (uint32\_t\ interface,\ Ipv4InterfaceAddress\ address)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01268}01268\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01269}01269\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ interface\ <<\ address);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01270}01270\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a89c21e449a0c76b491a29fb1e1e81eb9}{m\_respondToInterfaceEvents}}\ \&\&\ Simulator::Now\ ().GetSeconds\ ()\ >\ 0)\ \ \textcolor{comment}{//\ avoid\ startup\ events}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01271}01271\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01272}01272\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_acea317a83af55525aa4453f33839db3a}{DGRRouteManager::DeleteDGRRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01273}01273\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_a62b76ca8cab68a61efd72c5fe5d092dc}{DGRRouteManager::BuildDGRRoutingDatabase}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01274}01274\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_d_g_r_route_manager_ad637a566676faf22176f66f1afdb8c3c}{DGRRouteManager::InitializeRoutes}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01275}01275\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01276}01276\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01277}01277\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01278}01278\ \textcolor{keywordtype}{void}\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01279}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a207e729e59e0539db18dd241276bf02e}{01279}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a207e729e59e0539db18dd241276bf02e}{Ipv4DGRRouting::SetIpv4}}\ (Ptr<Ipv4>\ ipv4)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01280}01280\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01281}01281\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ ipv4);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01282}01282\ \ \ NS\_ASSERT\ (!\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}\ \&\&\ ipv4);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01283}01283\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}\ =\ ipv4;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01284}01284\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01285}01285\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01286}01286\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01287}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a2eb8a683180ce3d3726767f5b986e3d8}{01287}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a2eb8a683180ce3d3726767f5b986e3d8}{Ipv4DGRRouting::Receive}}\ (Ptr<Socket>\ socket)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01288}01288\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01289}01289\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ socket);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01290}01290\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01291}01291\ \ \ Address\ sender;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01292}01292\ \ \ Ptr<Packet>\ packet\ =\ socket-\/>RecvFrom\ (sender);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01293}01293\ \ \ InetSocketAddress\ senderAddr\ =\ InetSocketAddress::ConvertFrom\ (sender);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01294}01294\ \ \ NS\_LOG\_INFO\ (\textcolor{stringliteral}{"{}Received\ "{}}\ <<\ *packet\ <<\ \textcolor{stringliteral}{"{}\ from\ "{}}\ <<\ senderAddr.GetIpv4\ ()\ <<\ \textcolor{stringliteral}{"{}:"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01295}01295\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ senderAddr.GetPort\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01296}01296\ \ \ Ipv4Address\ senderAddress\ =\ senderAddr.GetIpv4\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01297}01297\ \ \ \textcolor{comment}{//\ uint32\_t\ senderPort\ =\ senderAddr.GetPort\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01298}01298\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01299}01299\ \ \ \textcolor{keywordflow}{if}\ (socket\ ==\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a77198894f24e45afcdcd80c63f02a507}{m\_multicastRecvSocket}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01300}01300\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01301}01301\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Received\ a\ packet\ from\ the\ multicast\ socket"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01302}01302\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01303}01303\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01304}01304\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01305}01305\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Received\ a\ packet\ from\ one\ of\ the\ unicast\ sockets"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01306}01306\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01307}01307\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01308}01308\ \ \ Ipv4PacketInfoTag\ interfaceInfo;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01309}01309\ \ \ \textcolor{keywordflow}{if}\ (!packet-\/>RemovePacketTag\ (interfaceInfo))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01310}01310\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01311}01311\ \ \ \ \ \ \ NS\_ABORT\_MSG\ (\textcolor{stringliteral}{"{}No\ incoming\ interface\ on\ This\ message,\ aborting,"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01312}01312\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01313}01313\ \ \ uint32\_t\ incomingIf\ =\ interfaceInfo.GetRecvIf\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01314}01314\ \ \ Ptr<Node>\ node\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01315}01315\ \ \ Ptr<NetDevice>\ dev\ =\ node-\/>GetDevice\ (incomingIf);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01316}01316\ \ \ uint32\_t\ ipInterfaceIndex\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetInterfaceForDevice\ (dev);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01317}01317\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01318}01318\ \ \ SocketIpTtlTag\ hoplimitTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01319}01319\ \ \ \textcolor{keywordflow}{if}\ (!packet-\/>RemovePacketTag\ (hoplimitTag))}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01320}01320\ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01321}01321\ \ \ \ \ NS\_ABORT\_MSG\ (\textcolor{stringliteral}{"{}No\ incoming\ Hop\ count\ on\ message,\ aborting"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01322}01322\ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01323}01323\ \ \ uint8\_t\ hopLimit\ =\ hoplimitTag.GetTtl\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01324}01324\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01325}01325\ \ \ int32\_t\ interfaceForAddress\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetInterfaceForAddress\ (senderAddress);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01326}01326\ \ \ \textcolor{keywordflow}{if}\ (interfaceForAddress\ !=\ -\/1)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01327}01327\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01328}01328\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Ignoring\ a\ packet\ sent\ by\ myself."{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01329}01329\ \ \ \ \ \ \ return\ ;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01330}01330\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01331}01331\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01332}01332\ \ \ \mbox{\hyperlink{classns3_1_1_dgr_header}{DgrHeader}}\ hdr;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01333}01333\ \ \ packet-\/>RemoveHeader\ (hdr);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01334}01334\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01335}01335\ \ \ \textcolor{keywordflow}{if}\ (hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_a75a9665a3108d89e19891e73b0f51251}{GetCommand}}\ ()\ ==\ \mbox{\hyperlink{classns3_1_1_dgr_header_ab21f647781eecc35e6b201178915de4ca8d8894292f7def51be8e3f118f7c1e08}{DgrHeader::RESPONSE}})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01336}01336\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01337}01337\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}The\ message\ is\ a\ Response\ from\ "{}}\ <<\ senderAddr.GetIpv4\ ()\ <<\ \textcolor{stringliteral}{"{}:"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01338}01338\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ senderAddr.GetPort\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01339}01339\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa29a1573985386ddcc0c9616ab524836}{HandleResponses}}\ (hdr,\ senderAddress,\ ipInterfaceIndex,\ hopLimit);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01340}01340\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01341}01341\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01342}01342\ \ \ \textcolor{comment}{//\ else\ if\ (hdr.GetCommand\ ()\ ==\ DgrHeader::REQUEST)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01343}01343\ \ \ \textcolor{comment}{//\ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01344}01344\ \ \ \textcolor{comment}{//\ \ \ \ \ Todo:\ Handle\ request\ in\ the\ future\ \ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01345}01345\ \ \ \textcolor{comment}{//\ \ \ \ \ NS\_LOG\_LOGIC\ ("{}This\ message\ is\ a\ Request\ from\ "{}\ <<\ senderAddr.GetIpv4\ ()\ <<\ "{}:"{}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01346}01346\ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ senderAddr.GetPort\ ());}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01347}01347\ \ \ \textcolor{comment}{//\ \ \ \ \ HandleRequests\ (hdr,\ senderAddress,\ senderPort,\ ipInterfaceIndex,\ hopLimit);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01348}01348\ \ \ \textcolor{comment}{//\ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01349}01349\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01350}01350\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01351}01351\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Ignoring\ message\ with\ unknown\ command:\ "{}}\ <<\ \textcolor{keywordtype}{int}(hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_a75a9665a3108d89e19891e73b0f51251}{GetCommand}}\ ()));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01352}01352\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01353}01353\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01354}01354\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01355}01355\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01356}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a238052760f17cb9a493e98ef38b6de8f}{01356}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a238052760f17cb9a493e98ef38b6de8f}{Ipv4DGRRouting::\ SendUnsolicitedUpdate}}\ ()}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01357}01357\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01358}01358\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01359}01359\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aab87511766c1d52fad340cb7e9031ad2}{m\_nextTriggeredUpdate}}.IsRunning\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01360}01360\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01361}01361\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aab87511766c1d52fad340cb7e9031ad2}{m\_nextTriggeredUpdate}}.Cancel\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01362}01362\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01363}01363\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff694e326df155e5a99a85d805b7d172}{DoSendNeighborStatusUpdate}}\ (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01364}01364\ \ \ \textcolor{comment}{//\ todo\ :\ update\ the\ delay,\ do\ we\ need\ some\ random\ in\ the\ delay}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01365}01365\ \ \ Time\ delay\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa6cef6ca1b8081689f2c63246b96eacb}{m\_unsolicitedUpdate}};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01366}01366\ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3e0c7233d7c81a2ee3890506bd45e4a8}{m\_nextUnsolicitedUpdate}}\ =\ Simulator::Schedule\ (delay,\ \&\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a238052760f17cb9a493e98ef38b6de8f}{Ipv4DGRRouting::SendUnsolicitedUpdate}},\ \textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01367}01367\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01368}01368\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01369}01369\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01370}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff694e326df155e5a99a85d805b7d172}{01370}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aff694e326df155e5a99a85d805b7d172}{Ipv4DGRRouting::DoSendNeighborStatusUpdate}}\ (\textcolor{keywordtype}{bool}\ periodic)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01371}01371\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01372}01372\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ (periodic\ ?\ \textcolor{stringliteral}{"{}\ periodic"{}}\ :\ \textcolor{stringliteral}{"{}\ triggered"{}}));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01373}01373\ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a493660f3b2ceaf55ef8b9c89aa5966f8}{SocketListI}}\ iter\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_acf002938df9649de6e46caba3212d52a}{m\_unicastSocketList}}.begin\ ();\ iter\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_acf002938df9649de6e46caba3212d52a}{m\_unicastSocketList}}.end\ ();\ iter\ ++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01374}01374\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01375}01375\ \ \ \ \ \ \ uint32\_t\ \textcolor{keyword}{interface\ }=\ iter-\/>second;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01376}01376\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8656e82eb3ad70826fc72f14d85bfab6}{m\_interfaceExclusions}}.find\ (interface)\ ==\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8656e82eb3ad70826fc72f14d85bfab6}{m\_interfaceExclusions}}.end\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01377}01377\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01378}01378\ \ \ \ \ \ \ \ \ \ \ uint16\_t\ mtu\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetMtu\ (interface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01379}01379\ \ \ \ \ \ \ \ \ \ \ uint16\_t\ maxNse\ =\ (mtu\ -\/\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01380}01380\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Header().GetSerializedSize\ ()\ -\/}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01381}01381\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ UdpHeader\ ().GetSerializedSize\ ()\ -\/\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01382}01382\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_dgr_header}{DgrHeader}}\ ().\mbox{\hyperlink{classns3_1_1_dgr_header_a2fcef3eb0f76c33b6d7c151dc4b939e3}{GetSerializedSize}}\ ())/}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01383}01383\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_dgr_nse}{DgrNse}}\ ().\mbox{\hyperlink{classns3_1_1_dgr_nse_a2b24a215ee38cb8ec0e5a8c6f5247e01}{GetSerializedSize}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01384}01384\ \ \ \ \ \ \ \ \ \ \ Ptr<Packet>\ p\ =\ Create<Packet>\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01385}01385\ \ \ \ \ \ \ \ \ \ \ SocketIpTtlTag\ ttlTag;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01386}01386\ \ \ \ \ \ \ \ \ \ \ ttlTag.SetTtl\ (1);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01387}01387\ \ \ \ \ \ \ \ \ \ \ p-\/>AddPacketTag\ (ttlTag);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01388}01388\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01389}01389\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_dgr_header}{DgrHeader}}\ hdr;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01390}01390\ \ \ \ \ \ \ \ \ \ \ hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_ae6c91c53e2bf12faf7f315e55a103412}{SetCommand}}\ (\mbox{\hyperlink{classns3_1_1_dgr_header_ab21f647781eecc35e6b201178915de4ca8d8894292f7def51be8e3f118f7c1e08}{DgrHeader::RESPONSE}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01391}01391\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Find\ the\ Status\ of\ every\ netdevice\ and\ put\ it\ in}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01392}01392\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ TODO:\ Finish\ this\ function\ when\ finish\ the\ NSE\ definiation}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01393}01393\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint32\_t\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ =\ 0;\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ <\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNInterfaces\ ();\ \mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}\ ++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01394}01394\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01395}01395\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>IsUp\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}))\ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01396}01396\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<LoopbackNetDevice>\ check\ =\ DynamicCast<LoopbackNetDevice>\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}}));}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01397}01397\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (check)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01398}01398\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01399}01399\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01400}01400\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01401}01401\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ get\ the\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01402}01402\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ dev\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetNetDevice\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01403}01403\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ get\ the\ queue\ disc\ on\ devic}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01404}01404\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ disc\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a3b78bce24115ecebf085e0c7c1f43583}{m\_ipv4}}-\/>GetObject<Node>\ ()-\/>}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01405}01405\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GetObject<TrafficControlLayer>\ ()-\/>}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01406}01406\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GetRootQueueDiscOnDevice\ (dev);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01407}01407\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ptr<DGRv2QueueDisc>\ qdisc\ =\ DynamicCast\ <DGRv2QueueDisc>\ (disc);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01408}01408\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_dgr_nse}{DgrNse}}\ nse;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01409}01409\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ nse.\mbox{\hyperlink{classns3_1_1_dgr_nse_a2e993c84f83ec1bddf787351c5c41401}{SetInterface}}\ (\mbox{\hyperlink{namespacens3_aa5e169e2453984d2f21c0d5cec9e907b}{i}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01410}01410\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ nse.\mbox{\hyperlink{classns3_1_1_dgr_nse_afed23298399afb86ba0bdf1f6ea19b7d}{SetState}}\ (qdisc-\/>GetQueueStatus\ ());}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01411}01411\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_a6004075aa81cee64dbf96c03e548f41e}{AddNse}}\ (nse);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01412}01412\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_ae7b3e6830add872de26fc78b1af52372}{GetNseNumber}}\ ()\ ==\ maxNse)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01413}01413\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01414}01414\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p-\/>AddHeader\ (hdr);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01415}01415\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_DEBUG\ (\textcolor{stringliteral}{"{}SendTo:\ "{}}\ <<\ *p);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01416}01416\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ iter-\/>first-\/>SendTo\ (p,\ 0,\ InetSocketAddress\ (\mbox{\hyperlink{ipv4-dgr-routing_8cc_ad1091203cec743531394bb68c50304ba}{DGR\_BROAD\_CAST}},\ \mbox{\hyperlink{ipv4-dgr-routing_8cc_a52dae417495c2e56cb353b2adfe23deb}{DGR\_PORT}}));\ \textcolor{comment}{//\ Todo\ :\ defind\ the\ port\ for\ DGR\ routing}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01417}01417\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p-\/>RemoveHeader\ (hdr);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01418}01418\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_a930203fc0319f7d6f2119079096168dc}{ClearNses}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01419}01419\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01420}01420\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01421}01421\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_ae7b3e6830add872de26fc78b1af52372}{GetNseNumber}}\ ()\ >\ 0)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01422}01422\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01423}01423\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p-\/>AddHeader\ (hdr);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01424}01424\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_DEBUG\ (\textcolor{stringliteral}{"{}SendTo:\ "{}}\ <<\ *p);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01425}01425\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ iter-\/>first-\/>SendTo(p,\ 0,\ InetSocketAddress\ (\mbox{\hyperlink{ipv4-dgr-routing_8cc_ad1091203cec743531394bb68c50304ba}{DGR\_BROAD\_CAST}},\ \mbox{\hyperlink{ipv4-dgr-routing_8cc_a52dae417495c2e56cb353b2adfe23deb}{DGR\_PORT}}));\ \textcolor{comment}{//\ Todo:\ Defined\ the\ DGR\ port}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01426}01426\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01427}01427\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01428}01428\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01429}01429\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01430}01430\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01431}01431\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01432}\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa29a1573985386ddcc0c9616ab524836}{01432}}\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_aa29a1573985386ddcc0c9616ab524836}{Ipv4DGRRouting::HandleResponses}}\ (\mbox{\hyperlink{classns3_1_1_dgr_header}{DgrHeader}}\ hdr,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01433}01433\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ senderAddress,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01434}01434\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ incomingInterface,}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01435}01435\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint8\_t\ hopLimit)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01436}01436\ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01437}01437\ \ \ NS\_LOG\_FUNCTION\ (\textcolor{keyword}{this}\ <<\ senderAddress\ <<\ incomingInterface\ <<\ \textcolor{keywordtype}{int}(hopLimit)\ <<\ hdr);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01438}01438\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8656e82eb3ad70826fc72f14d85bfab6}{m\_interfaceExclusions}}.find\ (incomingInterface)\ !=\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a8656e82eb3ad70826fc72f14d85bfab6}{m\_interfaceExclusions}}.end\ ())}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01439}01439\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01440}01440\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Ignoring\ an\ update\ message\ from\ an\ excluded\ interface:\ "{}}\ <<\ incomingInterface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01441}01441\ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01442}01442\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01443}01443\ \ \ \textcolor{keywordflow}{if}\ (hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_a2fcef3eb0f76c33b6d7c151dc4b939e3}{GetSerializedSize}}\ ()\ ==\ 4)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01444}01444\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01445}01445\ \ \ \ \ \ \ NS\_LOG\_LOGIC\ (\textcolor{stringliteral}{"{}Ignoring\ an\ update\ message\ without\ neighbor\ state\ entries!"{}});}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01446}01446\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01447}01447\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01448}01448\ \ \ \mbox{\hyperlink{classns3_1_1_neighbor_status_entry}{NeighborStatusEntry}}\ *entry\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a20d3a603d150f5ce97b49bcd1028e7e0}{m\_nsdb}}.\mbox{\hyperlink{classns3_1_1_dgr_n_s_d_b_afab689a2b1bf8ec2af909d5d05ab26a6}{HandleNeighborStatusEntry}}\ (incomingInterface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01449}01449\ \ \ \textcolor{keywordflow}{if}\ (entry\ ==\ \textcolor{keyword}{nullptr})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01450}01450\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01451}01451\ \ \ \ \ \ \ entry\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_neighbor_status_entry}{NeighborStatusEntry}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01452}01452\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_a20d3a603d150f5ce97b49bcd1028e7e0}{m\_nsdb}}.\mbox{\hyperlink{classns3_1_1_dgr_n_s_d_b_a0eabfc389423b0b694d6f30cb1b773f5}{Insert}}\ (incomingInterface,\ entry);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01453}01453\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01454}01454\ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01455}01455\ \ \ std::list<DgrNse>\ nses\ =\ hdr.\mbox{\hyperlink{classns3_1_1_dgr_header_ad28f3042c3a7579cf82d7debfab3ff94}{GetNseList}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01456}01456\ \ \ \textcolor{keywordflow}{for}\ (std::list<DgrNse>::iterator\ iter\ =\ nses.begin\ ();\ iter\ !=\ nses.end\ ();\ iter\ ++)}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01457}01457\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01458}01458\ \ \ \ \ \ \ uint32\_t\ n\_iface\ =\ (*iter).GetInterface\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01459}01459\ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ n\_state\ =\ (*iter).GetState\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01460}01460\ \ \ \ \ \ \ \mbox{\hyperlink{classns3_1_1_status_unit}{StatusUnit}}*\ su\ =\ entry-\/>\mbox{\hyperlink{classns3_1_1_neighbor_status_entry_a247a7c414ca757992904f162888375d9}{GetStatusUnit}}\ (n\_iface);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01461}01461\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (su\ ==\ \textcolor{keyword}{nullptr})}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01462}01462\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01463}01463\ \ \ \ \ \ \ \ \ \ \ su\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{classns3_1_1_status_unit}{StatusUnit}}\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01464}01464\ \ \ \ \ \ \ \ \ \ \ entry-\/>\mbox{\hyperlink{classns3_1_1_neighbor_status_entry_ad12f02c2d3a0eb4ec1f838adbc93961e}{Insert}}\ (n\_iface,\ su);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01465}01465\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01466}01466\ \ \ \ \ \ \ su-\/>\mbox{\hyperlink{classns3_1_1_status_unit_a6e3953db49c443f23281dec449661d39}{Update}}\ (n\_state);}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01467}01467\ \ \ \ \ \ \ std::ostream*\ os\ =\ \mbox{\hyperlink{classns3_1_1_ipv4_d_g_r_routing_ac1ef824e03b0393dcad185295ef373f6}{m\_outStream}}-\/>GetStream\ ();}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01468}01468\ \ \ \ \ \ \ *os\ <<\ \textcolor{stringliteral}{"{}Iface:\ "{}}\ <<\ n\_iface\ <<\ \textcolor{stringliteral}{"{}\ Predict\ Err:\ "{}}\ <<\ abs(n\_state\ -\/\ su-\/>\mbox{\hyperlink{classns3_1_1_status_unit_a165815e13c7cda840f5e77961f412b8d}{GetCurrentState}}\ ())\ <<\ std::endl;}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01469}01469\ \ \ \ \ \ \ \textcolor{comment}{//\ Print\ the\ su}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01470}01470\ \ \ \ \ \ \ \textcolor{comment}{//\ su-\/>Print\ (std::cout);\ \ \ \ \ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01471}01471\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01472}01472\ \}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01473}01473\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01474}01474\ \textcolor{comment}{//\ void}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01475}01475\ \textcolor{comment}{//\ Ipv4DGRRouting::HandleRequests\ (DgrHeader\ hdr,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01476}01476\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ipv4Address\ senderAddress,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01477}01477\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint16\_t\ senderPort,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01478}01478\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ incomingInterface,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01479}01479\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint8\_t\ hopLimit)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01480}01480\ \textcolor{comment}{//\ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01481}01481\ \textcolor{comment}{//\ \ \ NS\_LOG\_FUNCTION\ (this\ <<\ senderAddress\ <<\ senderPort\ }}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01482}01482\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ incomingInterface\ <<\ hopLimit\ <<\ hdr);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01483}01483\ \textcolor{comment}{//\ \ \ std::cout\ <<\ "{}>>\ Handle\ requests\ of\ Address:\ "{};}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01484}01484\ \textcolor{comment}{//\ \ \ senderAddress.Print\ (std::cout);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01485}01485\ \textcolor{comment}{//\ \ \ std::cout\ <<\ "{}\ hopLimit:\ "{}\ <<\ hopLimit\ <<\ std::endl;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01486}01486\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01487}01487\ \textcolor{comment}{//\ \ \ if\ (m\_interfaceExclusions.find\ (incomingInterface)\ ==\ m\_interfaceExclusions.end\ ())}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01488}01488\ \textcolor{comment}{//\ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01489}01489\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ We\ use\ one\ of\ the\ sending\ sockets,\ as\ they're\ bound\ to\ the\ right\ interface}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01490}01490\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ and\ the\ local\ address\ might\ be\ used\ on\ different\ interfaces.}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01491}01491\ \textcolor{comment}{//\ \ \ \ \ \ \ Ptr<Socket>\ sendingSocket;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01492}01492\ \textcolor{comment}{//\ \ \ \ \ \ \ for\ (SocketListI\ iter\ =\ m\_unicastSocketList.begin\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01493}01493\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ iter\ !=\ m\_unicastSocketList.end\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01494}01494\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ iter\ ++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01495}01495\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01496}01496\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (iter-\/>second\ ==\ incomingInterface)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01497}01497\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01498}01498\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sendingSocket\ =\ iter-\/>first;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01499}01499\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01500}01500\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01501}01501\ \textcolor{comment}{//\ \ \ \ \ \ \ NS\_ASSERT\_MSG\ (sendingSocket,}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01502}01502\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "{}HandleRequest\ -\/\ Impossible\ to\ find\ a\ socket\ to\ send\ the\ reply"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01503}01503\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01504}01504\ \textcolor{comment}{//\ \ \ \ \ \ \ uint16\_t\ mtu\ =\ m\_ipv4-\/>GetMtu\ (incomingInterface);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01505}01505\ \textcolor{comment}{//\ \ \ \ \ \ \ uint16\_t\ maxNse\ =\ (mtu\ -\/\ Ipv4Header().GetSerializedSize\ ()\ -\/}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01506}01506\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ UdpHeader\ ().GetSerializedSize\ ()\ -\/\ DgrHeader\ ().GetSerializedSize\ ())/DgrNse\ ().GetSerializedSize\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01507}01507\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01508}01508\ \textcolor{comment}{//\ \ \ \ \ \ \ Ptr<Packet>\ p\ =\ Create<Packet>\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01509}01509\ \textcolor{comment}{//\ \ \ \ \ \ \ SocketIpTtlTag\ ttlTag;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01510}01510\ \textcolor{comment}{//\ \ \ \ \ \ \ ttlTag.SetTtl\ (1);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01511}01511\ \textcolor{comment}{//\ \ \ \ \ \ \ p-\/>AddPacketTag\ (ttlTag);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01512}01512\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01513}01513\ \textcolor{comment}{//\ \ \ \ \ \ \ //\ Serialize\ the\ current\ Device\ Status}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01514}01514\ \textcolor{comment}{//\ \ \ \ \ \ \ DgrHeader\ hdr;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01515}01515\ \textcolor{comment}{//\ \ \ \ \ \ \ hdr.SetCommand\ (DgrHeader::RESPONSE);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01516}01516\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01517}01517\ \textcolor{comment}{//\ \ \ \ \ \ \ for\ (uint32\_t\ i\ =\ 0;\ i\ <\ m\_ipv4-\/>GetNInterfaces\ ();\ i\ ++)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01518}01518\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01519}01519\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (!m\_ipv4-\/>IsUp\ (i))\ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01520}01520\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01521}01521\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ get\ the\ device}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01522}01522\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr<NetDevice>\ dev\ =\ m\_ipv4-\/>GetNetDevice\ (i);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01523}01523\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01524}01524\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ //\ get\ the\ queue\ disc\ on\ devic}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01525}01525\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr<QueueDisc>\ disc\ =\ m\_ipv4-\/>GetObject<Node>\ ()-\/>}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01526}01526\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GetObject<TrafficControlLayer>\ ()-\/>}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01527}01527\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GetRootQueueDiscOnDevice\ (dev);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01528}01528\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (disc\ ==\ nullptr)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01529}01529\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01530}01530\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}loopback\ devices\ don't\ have\ queue\ disc!"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01531}01531\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01532}01532\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01533}01533\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01534}01534\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ Ptr<DGRv2QueueDisc>\ dgr\_disc\ =\ DynamicCast\ <DGRv2QueueDisc>\ (disc);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01535}01535\ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01536}01536\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (dgr\_disc\ ==\ nullptr)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01537}01537\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01538}01538\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_LOGIC\ ("{}No\ DGRv2QueueDisc\ find!"{});}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01539}01539\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01540}01540\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01541}01541\ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01542}01542\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ DgrNse\ nse;}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01543}01543\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ nse.SetInterface\ (i);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01544}01544\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ hdr.AddNse\ (nse);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01545}01545\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ if\ (hdr.GetNseNumber\ ()\ ==\ maxNse)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01546}01546\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01547}01547\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p-\/>AddHeader\ (hdr);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01548}01548\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_DEBUG\ ("{}SendTo:\ "{}\ <<\ *p);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01549}01549\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sendingSocket-\/>SendTo\ (p,\ 0,\ InetSocketAddress\ (senderAddress,\ DGR\_PORT));\ //\ to\ neighbor}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01550}01550\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p-\/>RemoveHeader\ (hdr);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01551}01551\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ hdr.ClearNses\ ();}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01552}01552\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01553}01553\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01554}01554\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ if\ (hdr.GetNseNumber\ ()\ >\ 0)}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01555}01555\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01556}01556\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ p-\/>AddHeader\ (hdr);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01557}01557\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ NS\_LOG\_DEBUG\ ("{}SendTo:\ "{}\ <<\ *p);}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01558}01558\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \ \ sendingSocket-\/>SendTo(p,\ 0,\ InetSocketAddress\ (senderAddress,\ DGR\_PORT));\ //\ Todo:\ Defined\ the\ RIP\ port}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01559}01559\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01560}01560\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01561}01561\ \textcolor{comment}{//\ \}}}
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01562}01562\ }
\DoxyCodeLine{\Hypertarget{ipv4-dgr-routing_8cc_source_l01563}01563\ \}\ \textcolor{comment}{//\ namespace\ ns3}}

\end{DoxyCode}
